The GitHub Actions job "Required Checks" on texera.git/feat/vitest-migration 
has failed.
Run started by GitHub user Yicong-Huang (triggered by Yicong-Huang).

Head commit for run:
61bf04685b286c102e6785f8150aff4a2c731a87 / Yicong Huang 
<[email protected]>
feat(frontend): enable more tests w/o source changes — stub empty specs, 
polyfill SVG

Three improvements that move excluded specs back into the green set
without touching any production source:

**Empty stub specs → it.todo placeholder** (2 files re-enabled):
- `workflow-executions.service.spec.ts` had only a license header.
- `joint-ui.service.spec.ts` had every previous test commented out.

In both, add a single `it.todo("...")` so vitest's discovery sees a
suite. Counts as "skipped" not failing, and removes "No test suite
found" errors. Real tests are tracked in #4861.

**SVG polyfill for jointjs** (`src/jsdom-svg-polyfill.ts`, new):

jsdom doesn't implement `SVGSVGElement#createSVGMatrix` /
`createSVGPoint` / `createSVGTransform`, nor `SVGGraphicsElement`'s
`getScreenCTM` / `getCTM` / `getBBox`. jointjs reaches into all of
these during graph layout and crashes with `TypeError:
svgDocument.createSVGMatrix is not a function`. The polyfill stubs
each one with identity-ish geometry — matrices/points behave as the
identity, BBox reports zero. Wired in via `setupFiles` on the
unit-test builder. Specs that only need jointjs to instantiate cleanly
now pass; specs that depend on actual graph-geometry math (only
`drag-drop.service.spec.ts` of the active set) are still excluded
because the zero-dim fakes break their assertions — re-enabling those
needs Vitest browser mode, tracked in #4861.

**Done-callback rewrite for workflow-result** (preparatory):

Two `it.skip` tests that used `service.X.subscribe(r => { ...
done(); })` rewritten to `const r = await firstValueFrom(service.X);
...`. The mocked observable from `selectPage` is `of(...)` — synchronous
— so the await resolves the same turn. Spec is still excluded because
it transitively pulls `auth.service` → `RegistrationRequestModalComponent`
(category 2 above), but the rewrite is ready for whoever fixes that.

Update `tsconfig.spec.json` exclude comments: roll the three
done-callback specs (workflow-result, download, preset) into the same
"reaches the auth/modal chain" exclusion category since that's the
remaining blocker for all of them — keeping a separate "done-callback"
category was misleading after the rewrite.

Local: 14 passed + 2 skipped (todo) = 16 test files; 109 passing tests.
Up from 14 files / 109 tests in the previous push.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>

Report URL: https://github.com/apache/texera/actions/runs/25285691611

With regards,
GitHub Actions via GitBox

Reply via email to