From 2629101104038d2ad6fd2cdb51599beb2444a05b Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Fri, 31 May 2024 14:37:40 +0200 Subject: [PATCH 1/4] tests: fix flaky locator --- tests/e2e/journeys/upgrade-free-tier.spec.ts | 2 +- tests/e2e/steps/pro-project.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/journeys/upgrade-free-tier.spec.ts b/tests/e2e/journeys/upgrade-free-tier.spec.ts index 63b58b53d..d4c8c8481 100644 --- a/tests/e2e/journeys/upgrade-free-tier.spec.ts +++ b/tests/e2e/journeys/upgrade-free-tier.spec.ts @@ -10,7 +10,7 @@ test('upgrade - free tier', async ({ page }) => { await page.getByRole('link', { name: 'upgrade' }).click(); await page.waitForURL('/console/organization-**/change-plan'); await page.locator('input[value="tier-1"]').click(); - await page.getByRole('button', { name: ' Add', exact: true }).click(); + await page.getByRole('button', { name: 'add' }).first().click(); await enterCreditCard(page); // skip members await page.getByRole('button', { name: 'change plan' }).click(); diff --git a/tests/e2e/steps/pro-project.ts b/tests/e2e/steps/pro-project.ts index 287510713..2297dbedb 100644 --- a/tests/e2e/steps/pro-project.ts +++ b/tests/e2e/steps/pro-project.ts @@ -24,7 +24,7 @@ export async function createProProject(page: Page): Promise { await page.locator('id=plan').selectOption('tier-1'); await page.getByRole('button', { name: 'get started' }).click(); await page.waitForURL('/console/create-organization**'); - await page.getByRole('button', { name: ' Add', exact: true }).click(); + await page.getByRole('button', { name: 'Add' }).first().click(); await enterCreditCard(page); // skip members await page.getByRole('button', { name: 'create organization' }).click(); From 4fbc23df94641b8aa2d12b7eaed2f085d90ce000 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Fri, 31 May 2024 14:52:21 +0200 Subject: [PATCH 2/4] ci: fix target branch for e2e --- .github/workflows/e2e.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 488e054ba..a78131473 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -15,6 +15,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + with: + ref: '${{ github.event.pull_request.merge_commit_sha }}' - name: Use Node.js uses: actions/setup-node@v3 with: From a55b8b66af13ad5347f223d6ae7ff8bb102604cd Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Fri, 31 May 2024 14:53:40 +0200 Subject: [PATCH 3/4] ci: fix target branch for e2e --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index a78131473..e95f9ddd8 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/checkout@v3 with: - ref: '${{ github.event.pull_request.merge_commit_sha }}' + ref: 'refs/pull/${{ github.event.number }}/merge' - name: Use Node.js uses: actions/setup-node@v3 with: From b4672a7002b8c4bb460c68c2d0c79f7c2462c3a3 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Fri, 31 May 2024 14:56:08 +0200 Subject: [PATCH 4/4] ci: fix target branch for e2e --- .github/workflows/e2e.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index e95f9ddd8..dfb96405a 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -14,9 +14,9 @@ jobs: e2e: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: - ref: 'refs/pull/${{ github.event.number }}/merge' + ref: ${{ github.event.pull_request.head.sha }} - name: Use Node.js uses: actions/setup-node@v3 with: