Skip to content

Commit c4c2c6f

Browse files
committed
fix(webview): emit Playwright CT coverage LCOV
1 parent df36498 commit c4c2c6f

8 files changed

Lines changed: 205 additions & 9 deletions

File tree

knip.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"source-map",
3333
"tailwindcss",
3434
"tailwindcss-animate",
35-
"monocart-coverage-reports"
35+
"monocart-reporter"
3636
]
3737
},
3838
"apps/cli": {

pnpm-lock.yaml

Lines changed: 151 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
# testing
99
/coverage
10+
/coverage-ct
11+
/monocart-report
12+
/assets/monocart-coverage-app.js
1013
/playwright-report
1114
/test-results
1215
/playwright/.cache

webview-ui/AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,4 @@ Codecov tracks `webview-ui` coverage under the `webview-ui` flag.
5050
- If Docker is unavailable, `pnpm test:visual` can help diagnose test code, but do not create or update committed baselines from the host rendering environment.
5151
- Keep visual tests limited to components supported by the current Playwright harness. Add shared extension state, translation, React Query, or other provider support before snapshotting components that require it.
5252
- The current baseline naming assumes a single Chromium project. Include `{projectName}` in `snapshotPathTemplate` before adding another browser project.
53+
- Import `test` and `expect` from `webview-ui/playwright/coverage-fixture.ts` (not directly from `@playwright/experimental-ct-react`) so the auto-fixture collects V8 coverage for `monocart-reporter` — that's what produces `coverage-ct/lcov.info` for the Codecov upload.

webview-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
"@vitest/ui": "4.1.9",
108108
"babel-plugin-react-compiler": "1.0.0",
109109
"jsdom": "26.1.0",
110-
"monocart-coverage-reports": "^2.12.12",
110+
"monocart-reporter": "^2.9.20",
111111
"vite": "8.1.0",
112112
"vitest": "4.1.9"
113113
}

0 commit comments

Comments
 (0)