Repository navigation
Description
Task Summary
Enable Vitest browser mode (Playwright-driven) for the specs that exercise jointjs paper geometry. Right now they run under jsdom with a stub SVG polyfill — enough for jointjs to instantiate, not enough to compute the graph layout the assertions depend on.
Currently affected
-
workflow-editor.component.spec.ts— entire suite (JointJS Paper+External Module Integration, ~22 tests). Every assertion depends on realgetScreenCTM/getBBox/ pointer-event hit testing that the jsdom polyfill returns identity-only stubs for. Currently kept on the exclusion list with the "jointjs paper geometry" comment intsconfig.spec.jsonandangular.json. -
drag-drop.service.spec.ts— 2 specific tests pinned withit.skipand a#4866comment:should find 3 input operatorPredicates and 3 output operatorPredicates for an operatorPredicate with 3 input / 3 output portsshould update highlighting, add operator, and add links when an operator is dropped
Both rely on
findClosestOperators, which queries SVG geometry. The other 4 tests in this file pass under jsdom and are running.
The earlier-listed monaco-related specs (code-debugger, code-editor, codearea-custom-template, time-travel, versions-list, operator-property-edit-frame) turned out to be blocked by infrastructure issues (CSS import, missing requestIdleCallback, stale TestBed shape), not jsdom layout. They were re-enabled in #4950.
Approach
Add Vitest browser mode via @vitest/browser + Playwright:
yarn add -D @vitest/browser playwright- Add a separate
vitest.browser.config.ts(or per-target config) that opts in to browser mode and includes only the affected patterns:test: { browser: { enabled: true, provider: 'playwright', headless: true, name: 'chromium' }, include: ['**/workflow-editor.component.spec.ts', '**/drag-drop.service.spec.ts'], }
- Wire a second
gui:test-browsertarget intoangular.jsonsong testkeeps the fast jsdom default and a dedicated browser-mode run handles these specs. - Drop
workflow-editor.component.spec.tsfrom the jsdom exclude lists; flip the 2 drag-dropit.skipback toit. - CI: add an ubuntu-only job (Playwright on macos/windows runners would multiply minute cost), cache the Playwright binary by version.
Definition of done
workflow-editor.component.spec.tsruns under browser mode with passing assertions.- The 2 drag-drop
it.skiptests are flipped back toitand pass under browser mode. - CI runs both default (jsdom) and browser-mode test targets; total wall-clock impact understood.
- Documentation note in
frontend/README.md(or similar) explaining when to use browser mode.
Task Type
- Bug
- New Feature
- Refactor / Cleanup
- DevOps / Deployment / CI
- Testing / QA
- Documentation
- Performance
- Other
Activity
[-]Vitest migration: enable browser mode for graph-rendering specs[/-][+]Enable browser mode for graph-rendering specs[/+]chore(frontend): re-enable 7 more workspace component specs
test(frontend): re-enable 11 result-panel/workspace component specs (#…
chore(frontend): re-enable 6 admin/left-panel component specs (#4897)
test(frontend): re-enable 4 user-workflow / dashboard / list-item spe…
test(frontend): unblock 7 specs from jsdom; narrow apache#4866 to joi…
test(frontend): unblock 7 specs from jsdom (#4950)
test(frontend): re-enable two skipped drag-drop tests
test(frontend): re-enable two skipped drag-drop tests (#4971)
feat(frontend): add Vitest browser mode and re-enable workflow-editor…
feat(frontend): add Vitest browser mode and re-enable workflow-editor…
feat(frontend): add Vitest browser mode and re-enable workflow-editor…
feat(frontend): add Vitest browser mode and re-enable workflow-editor…
test(frontend): add Vitest browser mode and re-enable workflow-editor…
test(frontend): re-enable 11 result-panel/workspace component specs (a…
chore(frontend): re-enable 6 admin/left-panel component specs (apache…
test(frontend): re-enable 4 user-workflow / dashboard / list-item spe…
test(frontend): unblock 7 specs from jsdom (apache#4950)
test(frontend): re-enable two skipped drag-drop tests (apache#4971)
test(frontend): add Vitest browser mode and re-enable workflow-editor…