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

   ### Task Summary
   
   `WorkflowExecutionHistoryComponent`
   
(`frontend/src/app/dashboard/component/user/user-workflow/ngbd-modal-workflow-executions/workflow-execution-history.component.ts`)
   has no `*.spec.ts` file. It is the execution-history modal: it lists past 
executions, draws
   pie charts, supports bookmarking, renaming, deleting (single + group), 
sorting, searching,
   selection, and pagination. It injects `WorkflowExecutionsService`, 
`NotificationService`,
   `NzModalService`, `WorkflowActionService`, `ActivatedRoute`, and optional 
`NZ_MODAL_DATA`.
   
   ### Recommended scope for one PR (the pure / state methods)
   
   - `should create`.
   - `getExecutionStatus(statusCode)`: pure mapping from code to status strings.
   - `abbreviate(name, nameFlag)`: pure string truncation.
   - `setAvatarColor(userName)` / `getRandomColor()`: deterministic-enough 
color helpers
     (assert format / stability).
   - Sorting: `ascSort(type)` and `dscSort(type)` over a small in-memory list.
   - Selection: `updateEidSet`, `updateRowSet`, `onAllChecked`, `onItemChecked`,
     `refreshCheckedStatus`.
   - Search: `searchInputOnChange(value)` and `searchExecution()` filtering an 
in-memory list.
   - Pagination: `onPageIndexChange`, `onPageSizeChange`.
   
   ### Leave lighter (note in the PR)
   
   - `generatePieChart(...)` and chart rendering: assert it does not throw with 
sample data;
     do not assert pixels.
   - The service-backed mutations (`onBookmarkToggle`, `onDelete`, 
`onGroupDelete`,
     `confirmUpdateWorkflowExecutionsCustomName`): cover success/error with 
stubbed observables
     if time permits.
   
   ### Suggested providers / mocks
   
   ```ts
   import { of, throwError } from "rxjs";
   import { ActivatedRoute } from "@angular/router";
   import { NZ_MODAL_DATA } from "ng-zorro-antd/modal";
   
   providers: [
     { provide: WorkflowExecutionsService, useValue: { /* list + mutate methods 
-> of()/throwError() */ } },
     { provide: NotificationService, useValue: { success: vi.fn(), error: 
vi.fn() } },
     { provide: NzModalService, useValue: { create: vi.fn() } },
     { provide: WorkflowActionService, useValue: { /* as needed */ } },
     { provide: ActivatedRoute, useValue: { snapshot: { params: {} }, params: 
of({}) } },
     { provide: NZ_MODAL_DATA, useValue: { wid: 1 } },
   ]
   ```
   
   
   
   ### 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