Skip to content

Commit a68e0ea

Browse files
committed
fix(tests): update remaining combobox tests to use findByRole
Fix the two remaining instances in Object Options and No Results tests
1 parent 7ba10ea commit a68e0ea

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/lib/holocene/combobox/combobox.stories.svelte

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@
9696

9797
await userEvent.type(combobox, 'Japanese');
9898

99-
const menu = canvas.getByRole('listbox');
99+
// Wait for the listbox to appear since it may have a transition
100+
const menu = await canvas.findByRole('listbox');
100101

101102
expect(menu).toBeInTheDocument();
102103
}}
@@ -113,7 +114,8 @@
113114

114115
await userEvent.type(combobox, 'Jerseyan');
115116

116-
const menu = canvas.getByRole('listbox');
117+
// Wait for the listbox to appear since it may have a transition
118+
const menu = await canvas.findByRole('listbox');
117119
const noResults = canvas.getByText('No Results');
118120

119121
expect(menu).toBeInTheDocument();

0 commit comments

Comments
 (0)