1- name : Testing for visual regression on old theme
1+ name : Running Playwright test on UI
22
33# Run the workflow when code is pushed or when a pull request is created
44on :
@@ -25,19 +25,16 @@ jobs:
2525 - name : Install dependencies and playwright browsers
2626 run : cd tests && npm ci && npx playwright install --with-deps
2727 - name : Run Playwright tests
28- id : test-visual
28+ id : test-ui
2929 run : |
3030 make tests | tee output.log
31- if grep -q -e "Error: A snapshot doesn't exist at" -e "Screenshot comparison failed" output.log; then
32- echo "Playwright tests failed due to a snapshot issue."
33- exit 1
34- elif grep -q "failed" output.log; then
35- echo "Playwright tests failed due to a non-snapshot issue."
31+ if grep -q "failed" output.log; then
32+ echo "Playwright tests failed. Please view the Playwright report to see full error."
3633 exit 1
3734 fi
3835 - uses : actions/upload-artifact@v4
3936 id : artifact-upload
40- if : ${{ !cancelled() && failure() && steps.test-visual .conclusion == 'failure' }}
37+ if : ${{ !cancelled() && failure() && steps.test-ui .conclusion == 'failure' }}
4138 with :
4239 name : playwright-report
4340 path : tests/playwright-report/
4744 if : ${{ failure() }}
4845 with :
4946 script : |
50- const body = `### <span aria-hidden="true">❌</span> Playwright visual snapshot differences were detected.
47+ const body = `### <span aria-hidden="true">❌</span> Playwright differences were detected.
5148
52- View the [Playwright report](${{ steps.artifact-upload.outputs.artifact-url }})
53- **To approve the snapshot changes and update the snapshots, please comment:** /approve-snapshots`;
49+ View the [Playwright report](${{ steps.artifact-upload.outputs.artifact-url }})`;
5450
5551 await github.rest.issues.createComment({
5652 issue_number: context.issue.number,
0 commit comments