Yicong-Huang opened a new issue, #4880:
URL: https://github.com/apache/texera/issues/4880

   ### Task Summary
   
   After #4873 made every component standalone and #4878 re-enabled the specs 
that compile and pass cleanly, **48 spec files** are still excluded in 
\`tsconfig.spec.json\` and \`angular.json\`'s test target. They compile but 
fail at runtime against the new TestBed expectations — the existing 
\`TestBed.configureTestingModule({ declarations: [...] })\` setups don't match 
the standalone-component graph.
   
   Each excluded entry needs its TestBed updated:
   
   - \`declarations: [Comp]\` → \`imports: [Comp]\` (since \`Comp\` is now 
standalone)
   - Module imports the spec used to rely on (e.g., \`FormsModule\`, 
\`NzButtonModule\`) usually need to move into the standalone component's own 
\`imports: []\` list, not the TestBed
   - Spec-only providers / dependencies stay in TestBed's \`providers: [...]\`
   
   ### Current excluded set (from PR #4878's exclusion list)
   
   **Component specs (43)** — \`*.component.spec.ts\` files in:
   
   - common/formly/preset-wrapper
   - dashboard/component (admin/{execution,settings,user}, dashboard, user/*)
   - hub/component (about, browse-section)
   - workspace/component (code-editor-dialog/*, codearea-custom-template, 
left-panel/*, menu/*, power-button, property-editor/*, result-panel/*, 
workflow-editor/*, workspace)
   
   **Service specs (5)** — compile but fail at runtime:
   
   - common/service/user/config/user-config.service.spec.ts
   - common/service/user/user.service.spec.ts
   - workspace/service/execute-workflow/execute-workflow.service.spec.ts
   - workspace/service/preset/preset.service.spec.ts (also has 
\`done\`-callback rewrites pending)
   - workspace/service/workflow-graph/model/coeditor-presence.service.spec.ts
   - dashboard/service/user/download/download.service.spec.ts (has 
\`done\`-callback rewrites pending)
   
   ### Suggested approach
   
   Land in batches of ~5 specs per PR — keeps each diff reviewable and lets 
failures be diagnosed in isolation. Service specs first (simpler TestBed), then 
component specs grouped by feature area (admin/, hub/, workspace/, etc.).
   
   For each batch:
   
   1. Drop the entries from the \`exclude\` list in both \`tsconfig.spec.json\` 
and \`angular.json\`.
   2. Run \`yarn ng test\`. Triage runtime failures.
   3. Update each spec's TestBed: move standalone components from 
\`declarations\` to \`imports\`; drop the module-scope imports the standalone 
component now carries itself.
   4. Verify \`yarn run test:ci\` exits 0.
   
   ### Definition of done
   
   \`tsconfig.spec.json\` / \`angular.json\` test exclude is empty (or contains 
only items deferred to other follow-ups like the jsdom-jointjs cases tracked in 
#4866). All component and service specs compile and pass.
   
   ### Task Type
   
   - [x] 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]

Reply via email to