@@ -564,15 +564,11 @@ test.describe('Daily developer workflow', () => {
564564 // emitted — the shell script runs asynchronously afterward. Waiting for a
565565 // filesystem artifact (the output file) is therefore inherently racy.
566566 // Instead, assert on the UI state that appears synchronously:
567- // 1. The hook-operation-header confirms hooks were triggered.
568- // 2. The terminal session tab confirms the terminal_tab launch request
569- // was handled by the frontend.
570- const hookHeader = tauriPage . getByTestId ( 'hook-operation-header' ) ;
571- await hookHeader . waitFor ( DEFAULT_UI_TIMEOUT ) ;
572- await expect ( hookHeader ) . toBeVisible ( ) ;
567+ // the terminal session tab confirms the terminal_tab launch request
568+ // was handled by the frontend.
573569
574570 const sessionTab = tauriPage . locator (
575- `[data-testid="terminal-session-tab"][data-session-label^ ="${ hookName } ( "]`
571+ `[data-testid="terminal-session-tab"][data-session-label="${ hookName } "]`
576572 ) ;
577573 await sessionTab . waitFor ( DEFAULT_UI_TIMEOUT ) ;
578574 await expect ( sessionTab ) . toBeVisible ( ) ;
@@ -677,15 +673,11 @@ test.describe('Daily developer workflow', () => {
677673 const targetBranch = 'feature/multi-hooks' ;
678674 await createWorktreeViaUi ( tauriPage , targetBranch ) ;
679675
680- const hookHeader = tauriPage . getByTestId ( 'hook-operation-header' ) ;
681- await hookHeader . waitFor ( DEFAULT_UI_TIMEOUT ) ;
682- await expect ( hookHeader ) . toBeVisible ( ) ;
683-
684676 const firstSessionTab = tauriPage . locator (
685- `[data-testid="terminal-session-tab"][data-session-label^ ="${ firstHookName } ( "]`
677+ `[data-testid="terminal-session-tab"][data-session-label="${ firstHookName } "]`
686678 ) ;
687679 const secondSessionTab = tauriPage . locator (
688- `[data-testid="terminal-session-tab"][data-session-label^ ="${ secondHookName } ( "]`
680+ `[data-testid="terminal-session-tab"][data-session-label="${ secondHookName } "]`
689681 ) ;
690682
691683 await firstSessionTab . waitFor ( DEFAULT_UI_TIMEOUT ) ;
@@ -764,10 +756,10 @@ test.describe('Daily developer workflow', () => {
764756 await createWorktreeViaUi ( tauriPage , targetBranch ) ;
765757
766758 const autoCloseSessionTab = tauriPage . locator (
767- `[data-testid="terminal-session-tab"][data-session-label^ ="${ autoCloseHookName } ( "]`
759+ `[data-testid="terminal-session-tab"][data-session-label="${ autoCloseHookName } "]`
768760 ) ;
769761 const keepOpenSessionTab = tauriPage . locator (
770- `[data-testid="terminal-session-tab"][data-session-label^ ="${ keepOpenHookName } ( "]`
762+ `[data-testid="terminal-session-tab"][data-session-label="${ keepOpenHookName } "]`
771763 ) ;
772764
773765 // ── Why this test races and how we synchronise on it ──────────────────────
0 commit comments