test: debug playwright ci with screenshots (#57396)

This commit is contained in:
Sem Bauke
2024-12-04 19:37:57 +01:00
committed by GitHub
parent e11152d60b
commit 097546ae0f
2 changed files with 9 additions and 2 deletions

View File

@@ -157,10 +157,16 @@ jobs:
pnpm run start-ci &
sleep 10
npx playwright test --project="${{ matrix.browsers }}" --grep-invert 'third-party-donation.spec.ts'
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report-${{ matrix.browsers }}
path: playwright/reporter
retention-days: 30
- name: Upload screenshots
if: failure()
uses: actions/upload-artifact@v4
with:
name: screenshots-${{ matrix.browsers }}
path: playwright/test-results
retention-days: 14

View File

@@ -35,7 +35,8 @@ export default defineConfig({
trace: 'on-first-retry',
storageState: 'playwright/.auth/certified-user.json',
/* Use custom test attribute */
testIdAttribute: 'data-playwright-test-label'
testIdAttribute: 'data-playwright-test-label',
screenshot: 'only-on-failure'
},
/* Configure projects for major browsers */