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): focus the Linear form field directly in the caret test

Lincoln Steinb5fd72358f7a
diff --git a/invokeai/frontend/webv2/src/features/workflow/ui/linear/WorkflowLinearPanel.browser.test.tsx b/invokeai/frontend/webv2/src/features/workflow/ui/linear/WorkflowLinearPanel.browser.test.tsx
index 0db04cacc0..111e22ff90 100644
--- a/invokeai/frontend/webv2/src/features/workflow/ui/linear/WorkflowLinearPanel.browser.test.tsx
+++ b/invokeai/frontend/webv2/src/features/workflow/ui/linear/WorkflowLinearPanel.browser.test.tsx
@@ -521,9 +521,13 @@ describe('Linear form field entry', () => {
return { error, field, value };
};
+ // Focused directly rather than clicked: what is under test is the caret surviving the edit's round trip
+ // through the project graph. A click has to hit-test the input, and each field label and reset button
+ // carries a tooltip that can open over it -- on the CI runner one did, and intercepted the click until
+ // the test timed out.
const focusAtEnd = (input: HTMLInputElement) =>
act(async () => {
- await userEvent.click(input);
+ input.focus();
await userEvent.keyboard('{End}');
});
const keys = (sequence: string) =>