From 30b8e8f105595b98022c3482ec19decdd43ed342 Mon Sep 17 00:00:00 2001 From: Jozsef Damokos Date: Tue, 7 Jan 2025 11:50:57 +0200 Subject: [PATCH] NEXT-37263 - Run playwright with artifacts --- .github/workflows/integration.yaml | 15 +++++++++++++-- tests/acceptance/tests/MigrationByUiFlow.spec.ts | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integration.yaml b/.github/workflows/integration.yaml index 6cb9fcc2..dc693430 100644 --- a/.github/workflows/integration.yaml +++ b/.github/workflows/integration.yaml @@ -120,7 +120,18 @@ jobs: run: | npm ci npx playwright install --with-deps - - name: Run Playwright + - name: Run Playwright with reporting working-directory: custom/plugins/${{ github.event.repository.name }}/tests/acceptance run: | - npx pwc --project-id ${{ secrets.CURRENTS_PROJECT_ID }} --key ${{ secrets.CURRENTS_RECORD_KEY }} --ci-build-id ${{ github.repository }}-${{ github.run_id }}-${{ matrix.PLATFORM_BRANCH }}-${{ github.run_attempt }} + npx pwc --project-id ${{ secrets.CURRENTS_PROJECT_ID }} --key ${{ secrets.CURRENTS_RECORD_KEY }} --ci-build-id ${{ github.repository }}-${{ github.run_id }}-${{ matrix.PLATFORM_BRANCH }}-${{ github.run_attempt }} -- --trace=on + - name: Run Playwright + working-directory: custom/plugins/${{ github.event.repository.name }}/tests/acceptance + run: npx playwright test --reporter=${{ github.event.act && 'line' || 'github' }} --trace=on-first-retry + - uses: actions/upload-artifact@v4 + if: always() + with: + name: e2e-${{ github.event.repository.name }}-${{ github.sha }} + path: + custom/plugins/${{ github.event.repository.name }}/tests/acceptance/test-results/ + custom/plugins/${{ github.event.repository.name }}/tests/acceptance/playwright-report/ + retention-days: 3 diff --git a/tests/acceptance/tests/MigrationByUiFlow.spec.ts b/tests/acceptance/tests/MigrationByUiFlow.spec.ts index 75f3253d..d744e841 100644 --- a/tests/acceptance/tests/MigrationByUiFlow.spec.ts +++ b/tests/acceptance/tests/MigrationByUiFlow.spec.ts @@ -27,7 +27,7 @@ test('As a shop owner I want to migrate my data from my old SW5 shop to SW6 via }); await test.step('Setup connection to local SW5 database', async () => { - await page.getByRole('button', { name: 'Create initia connection' }).click(); + await page.getByRole('button', { name: 'Create initial connection' }).click(); await page.getByRole('button', { name: 'Start', exact: true }).click(); await page.getByRole('button', { name: 'Continue' }).click(); await page.getByPlaceholder('Enter name').fill('sw5local');