mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-20 12:03:11 -04:00
test: debug playwright ci with screenshots (#57396)
This commit is contained in:
8
.github/workflows/e2e-playwright.yml
vendored
8
.github/workflows/e2e-playwright.yml
vendored
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user