Skip to content

Commit

Permalink
update playwright config for artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
Naseem77 committed Jan 27, 2025
1 parent 47d76a5 commit ad60353
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,10 @@ jobs:
name: playwright-report
path: playwright-report/
retention-days: 30
- name: Upload failed test screenshots
if: always()
uses: actions/upload-artifact@v4
with:
name: failed-test-screenshots
path: playwright-report/screenshots/
retention-days: 30
4 changes: 3 additions & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ export default defineConfig({
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: 'html',
reporter: [['html', { outputFolder: 'playwright-report' }]],
outputDir: 'playwright-report/artifacts',
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
// baseURL: 'http://127.0.0.1:3000',

/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
screenshot: 'only-on-failure',
},

/* Configure projects for major browsers */
Expand Down

0 comments on commit ad60353

Please sign in to comment.