mengw15 opened a new issue, #6541:
URL: https://github.com/apache/texera/issues/6541
### Task Summary
`frontend/src/app/dashboard/component/user/user-quota/user-quota.component.spec.ts`
has two flaky tests — `generatePieChart` / `generateLineChart` under
`chart generation` (added in #6524). They mock `plotly.js-basic-dist-min` at
the
module level (`vi.mock(...)`) to assert the call arguments, but that
interception
is **not reliable across the CI worker matrix**: when another spec loads the
module first, the mock does not apply, the real `Plotly.newPlot` runs, and it
throws `No DOM element with id 'pieDiv' exists on the page.`. The tests pass
on
macOS but fail intermittently on ubuntu/windows — this has already reddened
`main` and blocked the CI of an unrelated PR.
### What to do
- Drop the module-level `vi.mock` of `plotly.js-basic-dist-min`.
- Render into a real DOM element instead: create a `<div id="…">`, call the
method (real `Plotly.newPlot` renders fine in jsdom once the target element
exists), and assert on the `data` / `layout` Plotly attaches to the graph
div.
This is deterministic across platforms.
### Task Type
- [ ] Refactor / Cleanup
- [ ] DevOps / Deployment / CI
- [x] Testing / QA
- [ ] Documentation
- [ ] Performance
- [ ] Other
--
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]