Skip to content

Commit

Permalink
config: #4 add playwright report
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianrbp committed Aug 7, 2024
1 parent dac40c8 commit af63c72
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 5 deletions.
29 changes: 28 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,14 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: jest-test-report
path: frontend/test-reports/junit.xml
path: frontend/junit.xml
- name: Display Jest Test Results
uses: dorny/test-reporter@v1
if: always() # Run this step even if previous steps fail
with:
name: Jest Tests
path: frontend/junit.xml
reporter: junit

# - name: Start Rails server
# run: |
Expand Down Expand Up @@ -94,3 +101,23 @@ jobs:
cd frontend
yarn test:e2e
- name: Upload Playwright HTML Test Report
uses: actions/upload-artifact@v3
with:
name: playwright-report
path: frontend/playwright-report

- name: Upload Playwright Test Report
uses: actions/upload-artifact@v3
with:
name: playwright-report
path: frontend/playwright-tests.xml

- name: Display Playwright Test Results
uses: dorny/test-reporter@v1
if: always() # Run this step even if previous steps fail
with:
name: Playwright Tests
path: frontend/playwright-tests.xml
reporter: junit

10 changes: 6 additions & 4 deletions frontend/playwright.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ export default defineConfig({
expect: {
timeout: 5000,
},
// reporter: [
// ['list'],
// ['html', { outputFile: 'e2e/test-results/report.html' }],
// ],
reporter: [
["list"],
["junit", { outputFile: "playwright-tests.xml" }],
["html", { outputFolder: "playwright-report", open: "never" }],
// ['html', { outputFile: 'e2e/test-results/report.html' }],
],
});

0 comments on commit af63c72

Please sign in to comment.