You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "PG1204 (via GitHub)" <gi...@apache.org> on 2026/06/03 00:45:59 UTC
[I] Restore commented-out mouse-event tests in workflow-editor.component.spec.ts [texera]
PG1204 opened a new issue, #5318:
URL: https://github.com/apache/texera/issues/5318
### Task Summary
### Context
PR #5146 (which fixes #3614) commented out six mouse-event tests in [workflow-editor.component.spec.ts](https://github.com/apache/texera/blob/main/frontend/src/app/workspace/component/workflow-editor/workflow-editor.component.spec.ts) so the spec file could be removed from the angular.json exclusion list and run under the default jsdom test target. The six tests fail under jsdom because they depend on JointJS event paths (HTMLCanvasElement.getContext, SVG hit-testing, jQuery .trigger("mousedown"/"dblclick") dispatch) that jsdom doesn't implement, but they pass under ng run gui:test-browser (real Chrome via Playwright).
Each commented-out block is marked with a TODO(#3614) header in the spec file.
### Tests to restore
- should try to highlight the operator when user mouse clicks on an operator
- should highlight the commentBox when user clicks on a commentBox
- should open commentBox as NzModal when user double clicks on a commentBox
- should unhighlight all highlighted operators when user mouse clicks on the blank space
- should highlight multiple operators when user clicks on them with shift key pressed
- should unhighlight the highlighted operator when user clicks on it with shift key pressed
### Proposed approach
Move the six tests into a new sibling file workflow-editor.browser.spec.ts (uncommented), with its own TestBed setup. The .browser.spec.ts convention introduced after #5146 means jsdom skips this file and the test-browser target runs it, so no angular.json changes are needed. Remove the commented-out blocks and any orphan imports they leave behind in workflow-editor.component.spec.ts.
### Alternative considered
Polyfilling the jsdom gaps (canvas, SVG hit-testing, JointJS event dispatch) to keep everything in one file. Likely much more invasive and a moving target as JointJS evolves; not preferred unless a maintainer has a strong reason to keep the file split avoided.
### Related
PR #5146
Issue #3614
### Task Type
- [x] Refactor / Cleanup
- [ ] DevOps / Deployment / CI
- [ ] 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: notifications-unsubscribe@texera.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Restore commented-out mouse-event tests in workflow-editor.component.spec.ts [texera]
Posted by "PG1204 (via GitHub)" <gi...@apache.org>.
PG1204 commented on issue #5318:
URL: https://github.com/apache/texera/issues/5318#issuecomment-4641530880
@Xiao-zhen-Liu requesting your input on this.
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Restore commented-out mouse-event tests in workflow-editor.component.spec.ts [texera]
Posted by "Xiao-zhen-Liu (via GitHub)" <gi...@apache.org>.
Xiao-zhen-Liu commented on issue #5318:
URL: https://github.com/apache/texera/issues/5318#issuecomment-4676126412
Approach looks right to me — go with the `.browser.spec.ts` split.
It lines up with the convention already on `main` (jsdom excludes `**/*.browser.spec.ts`, `test-browser` includes it, and `code-editor.component.browser.spec.ts` is an existing precedent), and since the frontend build job runs `gui:test-browser` as a step (`build.yml`, "Run frontend browser-mode tests"), moving the six tests there genuinely restores them under an enforced CI run rather than just uncommenting them. Agree on skipping the jsdom-polyfill alternative — not worth chasing.
Two things to fold into the same PR:
1. Once the mouse-event tests move out, drop the explicit `workflow-editor.component.spec.ts` entry from the `test-browser` `include` in `angular.json` — otherwise the remaining jsdom-friendly tests run twice (jsdom + real Chrome).
2. The split means two `TestBed` setups for the same component; please share a common setup helper so they don't drift.
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Restore commented-out mouse-event tests in workflow-editor.component.spec.ts [texera]
Posted by "Xiao-zhen-Liu (via GitHub)" <gi...@apache.org>.
Xiao-zhen-Liu closed issue #5318: Restore commented-out mouse-event tests in workflow-editor.component.spec.ts
URL: https://github.com/apache/texera/issues/5318
--
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: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org