Skip to content

Commit e10e9d3

Browse files
committed
test(webview): add visual regression harness
1 parent ae89dbd commit e10e9d3

14 files changed

Lines changed: 442 additions & 1 deletion

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Webview Visual Regression
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
types: [opened, reopened, ready_for_review, synchronize]
7+
paths:
8+
- "webview-ui/**"
9+
- "src/shared/**"
10+
- "package.json"
11+
- "pnpm-lock.yaml"
12+
- ".github/workflows/visual-regression.yml"
13+
merge_group:
14+
types: [checks_requested]
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
webview-visual:
21+
runs-on: ubuntu-latest
22+
timeout-minutes: 10
23+
container:
24+
image: mcr.microsoft.com/playwright:v1.60.0-noble@sha256:9bd26ad900bb5e0f4dee75839e957a89ae89c2b7ab1e76050e559790e946b948
25+
options: --ipc=host
26+
steps:
27+
- name: Checkout code
28+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
29+
- name: Setup Node.js and pnpm
30+
uses: ./.github/actions/setup-node-pnpm
31+
with:
32+
install-args: "--frozen-lockfile"
33+
- name: Run webview visual tests
34+
run: pnpm --filter @roo-code/vscode-webview test:visual
35+
- name: Upload visual test artifacts
36+
if: failure()
37+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
38+
with:
39+
name: webview-visual-regression
40+
path: |
41+
webview-ui/playwright-report
42+
webview-ui/test-results
43+
if-no-files-found: ignore

0 commit comments

Comments
 (0)