Skip to content

Commit

Permalink
Initialisation Playwright
Browse files Browse the repository at this point in the history
  • Loading branch information
bbaret committed Aug 14, 2024
1 parent ef0f7b6 commit d5dd075
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,14 @@ jobs:
- name: Execution des tests Playwright
run: npx playwright test
env:
BASE_URL: ${{ steps.vercel_preview_url.outputs.preview_url }}
BASE_URL: https://${{ steps.vercel_preview_url.outputs.preview_url }}

- name: Ajout du commentaire dans la PR
run: npx github-actions-ctrf ctrf/ctrf-report.json --pr-comment
uses: daun/playwright-report-summary@v3
if: always()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
report-file: test-results.json
comment-title: 'Résultats des tests E2E Playwright'

- name: Mise à disposition des résultats
uses: actions/upload-artifact@v4
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ env.local
/playwright-report/
/blob-report/
/playwright/.cache/
test-results.json
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"build": "next build",
"start": "next start",
"lint": "next lint",
"e2e": "playwright test",
"predev": "react-dsfr update-icons",
"prebuild": "react-dsfr update-icons",
"prepare": "husky"
Expand Down Expand Up @@ -39,7 +40,6 @@
"@playwright/test": "^1.46.0",
"husky": "^9.1.4",
"lint-staged": "^15.2.8",
"playwright-ctrf-json-reporter": "^0.0.15",
"prettier": "^3.3.3",
"sass": "^1.77.8"
},
Expand Down
2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ 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'], ['playwright-ctrf-json-reporter', {}]],
reporter: [['html'], ['json', { outputFile: 'test-results.json' }]],
/* 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('/')`. */
Expand Down

0 comments on commit d5dd075

Please sign in to comment.