trilium/packages
Elian Doran e8eeb68b50
test(ckeditor5): run browser mode on Playwright instead of webdriverio
Vitest 5 handed the webdriverio provider to community maintenance, and no
stable 5.x of `@vitest/browser-webdriverio` was ever published — npm `latest`
is still 4.1.11, with only a 5.0.0-rc.1 from before vitest 5.0.0 shipped.
Pairing that v4 provider with `@vitest/browser` 5 kills the suite at startup:

    TypeError: Cannot read properties of undefined (reading 'project')
        at createBrowserServer (@vitest/browser/dist/index.js:7900:26)

`@vitest/browser-playwright` 5.0.0 is stable and first-party, and Playwright
1.62.1 is already here for the e2e suites, so the browser toolchain costs
nothing new. Only two of the 129 specs touch provider-visible API at all, both
through the provider-agnostic `userEvent`.

Playwright drives the browser over CDP with no separate driver, so the
chromedriver half of the NixOS workaround goes away: the dev shell keeps
`pkgs.chromium` and `CHROME_BIN`, which now reaches the provider as
`launchOptions.executablePath`. CI installs the browser in a step of its own
rather than inside the test step, whose 15-minute cap exists to catch a browser
session that never starts and should not also have to cover a 190 MB download.

Two specs depended on webdriverio behaviour and are fixed rather than skipped:

- The token-cost assertion read `1.234` where it wanted `1,234`.
  `toLocaleString()` takes the browser's locale, and Playwright inherits the
  host's where the old Chrome defaulted to en-US. Pinning `contextOptions.locale`
  keeps the suite from depending on the developer's machine.
- The format painter's drag-selection selected nothing. Playwright's
  `dragAndDrop` turns on drag interception, so the press reaches the page as an
  HTML5 drag intent instead of selecting text. Driving the press, move and
  release over CDP restores what the test is actually for: proving a *native*
  pointer interaction has updated the model selection by the time the `mouseup`
  listener runs.

Vitest 5 also moved failure screenshots from `.vitest-attachments` to
`.vitest`, which needs ignoring.

Verified: 127 files / 1626 tests green, coverage 99.91/99.54/100/99.98 against
the 99.5 gate. The Nix path is unexercised — `executablePath` is ordinary
Playwright, but it was not run from a dev shell.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-07 23:19:52 +02:00
..
ckeditor5 test(ckeditor5): run browser mode on Playwright instead of webdriverio 2026-09-07 23:19:52 +02:00
codemirror Update dependency @codemirror/legacy-modes to v6.5.4 2026-09-06 00:24:26 +00:00
commons style(autocomplete): address review nits 2026-09-06 21:55:18 +02:00
highlightjs fix(deps): update dependency highlight.js to v11.12.0 2026-08-15 04:25:17 +00:00
pdfjs-viewer build(pdfjs): update to pdf.js 6.3.289 2026-09-01 05:19:56 +00:00
share-theme Update vitest monorepo to v5 2026-09-07 20:53:14 +00:00
splitjs Update vitest monorepo to v5 2026-09-07 20:53:14 +00:00
trilium-backup-container docs: a container inspector needs 40 bytes, not 32 2026-08-19 20:20:37 +03:00
trilium-core chore(llm): refresh model price table (#11383) 2026-09-07 22:10:17 +02:00
trilium-e2e fix(autocomplete): keep the child-note row above the results 2026-09-06 21:07:30 +02:00
turndown-plugin-gfm Update vitest monorepo to v5 2026-09-07 20:53:14 +00:00
.gitkeep chore(nx): initialize as empty project 2025-04-22 14:38:57 +03:00