mengw15 opened a new pull request, #7886: URL: https://github.com/apache/texera/pull/7886
### What changes were proposed in this PR? `report-generation.service.spec.ts`'s four image tests waited on `generateWorkflowSnapshot`'s observable, which only settles once html2canvas finishes. Under jsdom that render takes an unbounded amount of time — on the macOS runner long enough that "reports an image that cannot be fetched at all" hit the 20s test timeout and turned the job red, while ubuntu and windows passed. It has been failing intermittently on macOS since #7541. The tests are about the inlining step that runs *before* the render, so they no longer wait for the render at all: `startSnapshot()` subscribes and returns, and each test waits for its own effect — the rewritten `href`, or the `console.error` the failure path logs. The "image with no source" case needs no wait, since the fake XHR issues its request synchronously. `afterEach` unsubscribes so nothing an in-flight render emits reaches a test that has already finished. Same assertions, same coverage: `report-generation.service.ts` stays at 129/129 statements and 25/25 branches. The spec file's tests went from 20.6s (timing out) to 348ms. ### Any related issues, documentation, discussions? Fixes a flake introduced by #7541. ### How was this PR tested? `ng test --watch=false --include src/app/workspace/service/report-generation/report-generation.service.spec.ts` — 26 passed, run 3x. Coverage (`--coverage`) confirms the file is unchanged at 129/129 statements. The failure path was verified by breaking the base64 assertion (red, non-zero exit) and restoring it. `yarn --cwd frontend format:ci` is clean. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 4.8 [1M context]) -- 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]
