Skip to content

Fully autonomous AI Agents system capable of performing complex penetration testing tasks

test(frontend): de-flake DetailNavigationSheet typing test via fireEvent.change

Sergey Kozyrenkoc3bd1d30f2f9
diff --git a/frontend/src/components/shared/detail-navigation/detail-navigation-sheet.test.tsx b/frontend/src/components/shared/detail-navigation/detail-navigation-sheet.test.tsx
index b0eddc50..3e204931 100644
--- a/frontend/src/components/shared/detail-navigation/detail-navigation-sheet.test.tsx
+++ b/frontend/src/components/shared/detail-navigation/detail-navigation-sheet.test.tsx
@@ -279,11 +279,12 @@ describe('DetailNavigationSheet — search input', () => {
});
it('typing narrows the listbox immediately when searchDebounceMs=0', async () => {
- const user = userEvent.setup();
renderSheet({ currentId: 'a' });
const input = await screen.findByRole('textbox');
- await user.type(input, 'cha');
+ // `fireEvent.change` — `user.type` races with the Radix focus trap (see
+ // the URL-filter AND test below for the same sidestep).
+ fireEvent.change(input, { target: { value: 'cha' } });
const listbox = await screen.findByRole('listbox');