[v10] Re-enable the component-testing mock suite (`test:browser:misc`)
Two CI checks are still switched off on v10. Each has its own root cause.
1. Component-testing mock suite (test:browser:misc)
e2e/browser-runner/mock.test.ts has been skipped since 1d12cfb11 (2024-12, "skip mock tests due to changes in Chrome"). It's skipped with echo "UNSKIP ME" || in e2e/package.json.
Still fails on v10 (a5d3f65af, Chrome 156, macOS). The first test (supports mocking of API requests) hangs until the mocha timeout, then the run dies with script.callFunction ... timed out.
The browser console shows browser.mock('**/api/**') running in the page and sending:
network.addIntercept {"phases":["beforeRequestSent","responseStarted"],"urlPatterns":[{"type":"pattern"}]}The glob has no fixed protocol, host or path, so the BiDi pattern is empty. An empty pattern intercepts every request, including the page's own requests to the driver and to Vite, and nothing progresses after that. This is likely a deadlock that only happens when mock() runs inside the browser runner. The same API works from the Node side.
2. "Check Git Context" after unit tests on Windows
test-unit.yml skips the step on Windows. It was re-enabled in #15737, failed, and was turned off again.
The cause is line endings. The Windows job unzips the Linux-built webdriverio-build.zip (download-archive) over a CRLF checkout. .gitattributes only pins *.ts, *.js, *.md, *.tsx and *.jsx to LF, so every other file in the archive shows as modified. That includes .json, LICENSE, .npmignore, .snap, .cts, .mjs and .ini files, and their diffs change only line endings. The old comment blaming the browser-runner utils.test.ts.snap was wrong; #15737 corrects it.
Options:
.gitattributes:* text=auto eol=lf, thengit add --renormalize .. This is repo-wide, with one-time churn.- Or set
core.autocrlf falsebeforeactions/checkouton the Windows jobs.
Done when
- Mock suite: root cause fixed (for example a narrower intercept, or not intercepting the runner's own traffic)
-
test:browser:miscunskipped and green in CI - Windows unit-test jobs leave a clean git tree
-
if: matrix.os != 'windows-latest'removed from "Check Git Context" intest-unit.yml
Related:
- #15708 and #15738 (Firefox
mock.respond()) - #15737 (Vitest 5; unskipped Preact and made the
getTemplatesnapshot run on Windows)
Source: webdriverio/webdriverio