Skip to content

Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.

test(webv2): stop the palette Tab-to-Retry test racing the search debounce

joshistoastdea793c93ae7
diff --git a/invokeai/frontend/webv2/src/workbench/palette/CommandPaletteDialog.browser.test.tsx b/invokeai/frontend/webv2/src/workbench/palette/CommandPaletteDialog.browser.test.tsx
index 1ab6a45a3d..546a2814cd 100644
--- a/invokeai/frontend/webv2/src/workbench/palette/CommandPaletteDialog.browser.test.tsx
+++ b/invokeai/frontend/webv2/src/workbench/palette/CommandPaletteDialog.browser.test.tsx
@@ -248,6 +248,14 @@ describe('CommandPaletteDialog interaction', () => {
const { input } = await renderPalette({ entries: [], providers: [provider] });
await act(() => userEvent.fill(input, 'zz'));
+ // Let the root search reject first, so the scope is entered from the settled
+ // state rather than from the window before the debounce fires. Tab only
+ // enters a scope when a scope row is highlighted, and the rejected root
+ // search puts its own navigable "Retry entities search" row ahead of the
+ // trailing scope rows — so reach the scope row explicitly, as ArrowUp wraps
+ // to it either way.
+ await waitForDebounce();
+ await act(() => userEvent.keyboard('{ArrowUp}'));
await act(() => userEvent.keyboard('{Tab}'));
const retry = await waitFor(() => {
const node = [...document.querySelectorAll('button')].find((button) => button.textContent === 'Retry');