From 7ba10eae50ff70800d70ccf934898796f3913900 Mon Sep 17 00:00:00 2001 From: Ross Nelson Date: Mon, 8 Sep 2025 16:03:43 -0400 Subject: [PATCH 1/3] fix(tests): update combobox tests to wait for listbox visibility Replace getByRole with findByRole to properly wait for the listbox element to become visible after the CSS transition completes --- src/lib/holocene/combobox/combobox.stories.svelte | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/holocene/combobox/combobox.stories.svelte b/src/lib/holocene/combobox/combobox.stories.svelte index ed040dcb81..2f74891f11 100644 --- a/src/lib/holocene/combobox/combobox.stories.svelte +++ b/src/lib/holocene/combobox/combobox.stories.svelte @@ -140,7 +140,8 @@ const canvas = within(canvasElement); const combobox = canvas.getByTestId(id); await userEvent.type(combobox, 'E'); - const menu = canvas.getByRole('listbox'); + // Wait for the listbox to appear since it may have a transition + const menu = await canvas.findByRole('listbox'); expect(menu).toBeInTheDocument(); }} /> @@ -153,7 +154,8 @@ await userEvent.type(combobox, 'one'); - const menu = canvas.getByRole('listbox'); + // Wait for the listbox to appear since it may have a transition + const menu = await canvas.findByRole('listbox'); expect(menu).toBeInTheDocument(); From a68e0ead606f8ef140462db72ca74c3f750635fe Mon Sep 17 00:00:00 2001 From: Ross Nelson Date: Mon, 8 Sep 2025 16:39:28 -0400 Subject: [PATCH 2/3] fix(tests): update remaining combobox tests to use findByRole Fix the two remaining instances in Object Options and No Results tests --- src/lib/holocene/combobox/combobox.stories.svelte | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/holocene/combobox/combobox.stories.svelte b/src/lib/holocene/combobox/combobox.stories.svelte index 2f74891f11..a8e4f6d029 100644 --- a/src/lib/holocene/combobox/combobox.stories.svelte +++ b/src/lib/holocene/combobox/combobox.stories.svelte @@ -96,7 +96,8 @@ await userEvent.type(combobox, 'Japanese'); - const menu = canvas.getByRole('listbox'); + // Wait for the listbox to appear since it may have a transition + const menu = await canvas.findByRole('listbox'); expect(menu).toBeInTheDocument(); }} @@ -113,7 +114,8 @@ await userEvent.type(combobox, 'Jerseyan'); - const menu = canvas.getByRole('listbox'); + // Wait for the listbox to appear since it may have a transition + const menu = await canvas.findByRole('listbox'); const noResults = canvas.getByText('No Results'); expect(menu).toBeInTheDocument(); From 1e87ddd27c3ab75953365cbd72967e23e64a6237 Mon Sep 17 00:00:00 2001 From: Ross Nelson Date: Mon, 8 Sep 2025 17:02:34 -0400 Subject: [PATCH 3/3] chore: trigger chromatic rebuild to clear cache