Yicong-Huang opened a new issue, #4866:
URL: https://github.com/apache/texera/issues/4866
### Task Summary
Enable Vitest browser mode (Playwright-driven) for specs that exercise
jointjs graph layout. Right now those specs run under jsdom with a stub SVG
polyfill — enough for jointjs to instantiate, not enough to compute graph
geometry the assertions depend on.
### Currently affected
- `drag-drop.service.spec.ts` — 2 tests assert on input/output operator
predicates and link counts that come out empty under jsdom because the polyfill
returns identity-only matrices.
(Other graph specs may surface here once #4864 unblocks the component specs
that touch jointjs.)
### Approach
Add Vitest browser mode via `@vitest/browser` + Playwright:
1. `yarn add -D @vitest/browser playwright`
2. Configure `vitest.config.ts` (or a per-target config) to opt-in browser
mode for the matching spec patterns:
```ts
test: {
browser: { enabled: true, provider: 'playwright', headless: true, name:
'chromium' },
include: ['**/joint-*.spec.ts', '**/drag-drop*.spec.ts'],
}
```
3. Wire the browser-mode target into the unit-test builder via an alternate
runner config, or split into a second `gui:test-browser` target if mixing modes
within one builder run is problematic.
4. Drop the affected specs from the exclusion list in `tsconfig.spec.json` /
`angular.json`.
### Definition of done
- `drag-drop.service.spec.ts` runs under browser mode with passing
assertions.
- CI runs both default (jsdom) and browser-mode test passes; total
wall-clock impact understood.
- Documentation note in `frontend/README.md` (or similar) explaining when to
use browser mode.
### Tracking
- Predecessor: #4863
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]