Skip to content

Commit 8a2a6a8

Browse files
committed
🤖 ci: deflake storybook GenericTool play
Change-Id: I89e5cf1a21b7fd491b7f821870ddeada88be9f39 Signed-off-by: Thomas Kosiewski <tk@coder.com>
1 parent b4465a5 commit 8a2a6a8

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

src/browser/stories/App.chat.stories.tsx

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -425,21 +425,6 @@ export const GenericTool: AppStory = {
425425
},
426426
},
427427
},
428-
play: async ({ canvasElement }: { canvasElement: HTMLElement }) => {
429-
const canvas = within(canvasElement);
430-
431-
// Wait for workspace metadata to load and main content to render
432-
await waitFor(
433-
async () => {
434-
const toolHeader = canvas.getByText("fetch_data");
435-
await userEvent.click(toolHeader);
436-
},
437-
{ timeout: 5000 }
438-
);
439-
// Wait for any auto-focus timers (ChatInput has 100ms delay), then blur
440-
await new Promise((resolve) => setTimeout(resolve, 150));
441-
(document.activeElement as HTMLElement)?.blur();
442-
},
443428
};
444429

445430
/** Streaming compaction with shimmer effect - tests GPU-accelerated animation */
@@ -573,7 +558,8 @@ export const ModeHelpTooltip: AppStory = {
573558
/>
574559
),
575560
play: async ({ canvasElement }) => {
576-
const canvas = within(canvasElement);
561+
const storyRoot = document.getElementById("storybook-root") ?? canvasElement;
562+
const canvas = within(storyRoot);
577563

578564
// Wait for app to fully load - the chat input with mode selector should be present
579565
await canvas.findAllByText("Exec", {}, { timeout: 10000 });

0 commit comments

Comments
 (0)