Ma77Ball opened a new issue, #5473:
URL: https://github.com/apache/texera/issues/5473

   ### Task Summary
   
   `WorkflowRuntimeStatisticsComponent`
   
(`frontend/src/app/dashboard/component/user/user-workflow/ngbd-modal-workflow-executions/workflow-runtime-statistics/workflow-runtime-statistics.component.ts`)
   has no `*.spec.ts` file. It has **no constructor-injected services**. Its 
core logic is
   `groupStatisticsByOperatorId()` (a pure transform over the input statistics 
array), which
   is the easiest, highest-value thing to lock down.
   
   ### What to do (step by step)
   
   1. Create the spec next to the component, with the Apache license header.
   2. The data the component charts comes from an `@Input` (or `NZ_MODAL_DATA`, 
check the
      top of the class). Set it before exercising the logic.
   3. `groupStatisticsByOperatorId` and `createDataset` are `private`. Test 
them through the
      public surface (`ngOnInit` / `onTabChanged`) and assert observable 
effects, or call
      them via `(component as any).groupStatisticsByOperatorId()` if testing 
the transform
      directly is clearer. Prefer the public path when practical.
   4. Run `yarn test -- workflow-runtime-statistics`, then `yarn lint`.
   
   ### Cover
   
   - `should create`.
   - Grouping: given statistics for two operator ids, the grouped result has 
one entry per
     id containing the rows for that id, in order.
   - `onTabChanged(index)` updates whatever field the template binds to (read 
the method).
   
   ### Notes
   
   - Charting (`createChart`) touches a charting library and the DOM; you do 
not need to
     assert pixels. Either avoid calling it in unit tests or stub the chart 
container. Focus
     on the data-shaping logic.
   
   
   
   ### 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]

Reply via email to