Skip to content

Commit

Permalink
Configure Playwright HTML reporter and upload trace results (HTBox#174)
Browse files Browse the repository at this point in the history
* Configure HTML reporter and upload trace results

* Upload playwright-report
  • Loading branch information
dpaquette authored Nov 23, 2022
1 parent 2dd2fd3 commit 89b4adf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/2wr-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,18 @@ jobs:
TWO_WEEKS_READY_E2E_TEST_USERNAME: ${{ secrets.TWO_WEEKS_READY_E2E_TEST_USERNAME }}
TWO_WEEKS_READY_E2E_TEST_PASSWORD: ${{ secrets.TWO_WEEKS_READY_E2E_TEST_PASSWORD }}
working-directory: ./2wr-app
- name: Upload e2e Test Results
- name: Upload e2e Test Results Recordings and Screenshots
uses: actions/upload-artifact@v2
if: failure()
with:
name: e2e-test-results
path: ./2wr-app/test-results
- name: Upload e2e Test Results Report
uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: e2e-test-report
path: ./2wr-app/playwright-report
- name: Clear sample env file from e2e tests
run: 'rm ./2wr-app/.env'
- name: Write env file
Expand Down
5 changes: 4 additions & 1 deletion 2wr-app/playwright.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ const config = {
use: {
baseURL: "http://localhost:8080/",
screenshot: "only-on-failure",
recording: "retain-on-failure",
trace: "retain-on-failure",
// Tell all tests to load signed-in state from 'storageState.json'.
storageState: "./tests/_storagestate/storageState.json"
}
},
reporter: [["list"], ["html", { output: "reports/report.html" }]]
};
module.exports = config;

0 comments on commit 89b4adf

Please sign in to comment.