Commit bc562bd
committed
test(e2e): make hub-client e2e suite pass on CI
Once the workflow could actually run the tests (see prior commit),
several real bugs and config gaps surfaced that had been hidden while
the workflow sat in the queue. None of these would have shown up
locally because the e2e suite had never been wired into anyone's
regular workflow.
- TS2345 in client.test.ts: installMockRepo used
`ReturnType<typeof createMockHandle>` without supplying T, so the
parameter defaulted to unknown. Forwarding T through makes the
helper generic and the test compiles again.
- Node-side IndexedDB shim: projectFactory.ts runs in the Playwright
test process (Node, not browser) but createSyncClient instantiates
an IndexedDBStorageAdapter unconditionally. Without a shim every
e2e test that called createProjectOnServer threw "indexedDB is not
defined" before doing anything else. Import fake-indexeddb/auto,
matching how sync-test-harness already handles vitest.
- Vite proxy target: hub-client's vite.config.ts proxies /auth/* and
the websocket to VITE_HUB_SERVER (default http://localhost:3000),
but globalSetup starts the e2e hub on port 3030 — so vite returned
HTTP 500 from /auth/me on every test, blocking the in-browser
hub-client from rendering the preview iframe. Pass
VITE_HUB_SERVER=http://localhost:3030 to the webServer env.
- Functional config picks up visual specs: testDir './e2e' with no
testIgnore was finding setup-screens.visual.spec.ts and running it
through the functional config, which has no missing-baseline retry.
Skip *.visual.spec.ts so those run only via playwright.visual.config.ts.
- CI workers: drop from 4 to 2. The 4-workers value was sized for the
original ubuntu-latest-8x; under ubuntu-latest (2 cores) random
tests stalled in the WASM render pipeline and missed the 45s
preview-iframe deadline non-deterministically. Reproduced locally
with 4 workers (a different test failed each run); 2 workers
cleared all flakes.
- Hub-client WASM gap (bd-izfv): the project-render path
(RenderToHtmlRenderer) drops the user_grammars provider on the
floor, so the smoke-all fixture
highlighting/03-user-grammar/03-user-grammar-toml.qmd renders a
bare <code> block instead of highlighted TOML. Add a
SKIP_WASM_UNSUPPORTED map in smokeAllDiscovery.ts pointing at
bd-izfv (which has a complete TDD plan on branch
beads/bd-izfv-thread-user-grammars).1 parent af0eec9 commit bc562bd
5 files changed
Lines changed: 42 additions & 7 deletions
File tree
- hub-client
- e2e
- helpers
- ts-packages/quarto-sync-client/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
23 | 33 | | |
24 | 34 | | |
25 | 35 | | |
| |||
231 | 241 | | |
232 | 242 | | |
233 | 243 | | |
234 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
235 | 253 | | |
236 | 254 | | |
237 | 255 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
20 | | - | |
21 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
22 | 29 | | |
23 | 30 | | |
24 | 31 | | |
| |||
61 | 68 | | |
62 | 69 | | |
63 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
64 | 77 | | |
65 | 78 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
109 | | - | |
110 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
0 commit comments