mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-14 17:41:22 +08:00
Add unit tests for various components and stores in the terminal dashboard
- Implement tests for AssociationHighlight, DashboardToolbar, QueuePanel, SessionGroupTree, and TerminalDashboardPage to ensure proper functionality and state management. - Create tests for cliSessionStore, issueQueueIntegrationStore, queueExecutionStore, queueSchedulerStore, sessionManagerStore, and terminalGridStore to validate state resets and workspace scoping. - Mock necessary dependencies and state management hooks to isolate tests and ensure accurate behavior.
This commit is contained in:
@@ -68,6 +68,8 @@ export interface QueueExecutionActions {
|
||||
removeExecution: (id: string) => void;
|
||||
/** Remove all completed and failed executions */
|
||||
clearCompleted: () => void;
|
||||
/** Reset workspace-scoped queue execution state */
|
||||
resetState: () => void;
|
||||
}
|
||||
|
||||
export type QueueExecutionStore = QueueExecutionState & QueueExecutionActions;
|
||||
@@ -150,6 +152,10 @@ export const useQueueExecutionStore = create<QueueExecutionStore>()(
|
||||
'clearCompleted'
|
||||
);
|
||||
},
|
||||
|
||||
resetState: () => {
|
||||
set({ ...initialState }, false, 'resetState');
|
||||
},
|
||||
}),
|
||||
{ name: 'QueueExecutionStore' }
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user