Yicong-Huang opened a new pull request, #4969: URL: https://github.com/apache/texera/pull/4969
### What changes were proposed in this PR? The placeholder spec at `frontend/src/app/workspace/component/workspace.component.spec.ts` was a license header only. Replace it with real tests covering the public surface of `WorkspaceComponent`: - `ngOnInit` — query-param `pid` parsing (numeric / non-numeric) and `setHighlightingEnabled` wiring - `ngAfterViewInit` — cold-start (no `wid` in route) vs warm-start (`wid` present, must show loading and disable modification) - `loadWorkflowWithId` — success path (sets shared model, reloads workflow, clears undo/redo, drops loading state) and 403/error path (resets to a new workflow, surfaces access error, drops loading) - `triggerCenter` — delegates to `WorkflowActionService.getTexeraGraph().triggerCenterEvent()` - `registerAutoPersistWorkflow` — idempotent (the `autoPersistRegistered` flag prevents duplicate subscriptions) - `copilotEnabled` — passes through `GuiConfigService.env.copilotEnabled` The fixture overrides the component's template to a minimal `<div #codeEditor>` so the heavyweight children (workflow editor, mini-map, left/right panels) don't have to compile in the test build, and stubs all 14 injected services. Drop the spec from the exclude lists in `tsconfig.spec.json` and `angular.json`. ### Any related issues, documentation, discussions? Closes #4967. ### How was this PR tested? `yarn ng test --watch=false`: 258 pass, 8 skip, 2 todo (10 new tests in `WorkspaceComponent`). `yarn format:ci` clean. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Opus 4.7 (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]
