Skip to content

The open alternative to Salesforce, designed for AI.

Wait for Select popup transitions (#27950)

Raphaël Bosi4770390e9abd
diff --git a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/utils/selectTest.ts b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/utils/selectTest.ts
index b71f037c01f..fc29bc6615a 100644
--- a/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/utils/selectTest.ts
+++ b/packages/twenty-front-component-renderer/src/__stories__/twenty-ui-gallery/utils/selectTest.ts
@@ -2,6 +2,7 @@ import { expect, userEvent, waitFor, within } from 'storybook/test';
import { errorHandler } from '@/__stories__/shared/test-utils/createFrontComponentStoryMeta';
import { expectFrontComponentMounted } from '@/__stories__/shared/test-utils/matchers/expectFrontComponentMounted';
+import { INTERACTION_TIMEOUT } from '@/__stories__/shared/test-utils/timeouts';
import { waitForSandboxRoundTrip } from '@/__stories__/shared/test-utils/waitForSandboxRoundTrip';
import { type TwentyUiGalleryPlayFunction } from '@/__stories__/twenty-ui-gallery/types/TwentyUiGalleryPlayFunction';
@@ -28,7 +29,9 @@ export const selectTest: TwentyUiGalleryPlayFunction = async ({
await userEvent.click(trigger);
const qualified = await page.findByRole('option', { name: 'Qualified' });
const archived = page.getByRole('option', { name: 'Archived' });
- await waitFor(() => expect(qualified).toBeVisible());
+ await waitFor(() => expect(qualified).toBeVisible(), {
+ timeout: INTERACTION_TIMEOUT,
+ });
expect(qualified.tagName).toBe('LI');
expect(archived).toHaveAttribute('aria-disabled', 'true');
expect(qualified.closest('[data-select-positioner="stage"]')).toHaveStyle({
@@ -57,7 +60,9 @@ export const selectTest: TwentyUiGalleryPlayFunction = async ({
await userEvent.click(trigger);
const newStage = await page.findByRole('option', { name: 'New' });
- await waitFor(() => expect(newStage).toBeVisible());
+ await waitFor(() => expect(newStage).toBeVisible(), {
+ timeout: INTERACTION_TIMEOUT,
+ });
expect(newStage.tagName).toBe('BUTTON');
await userEvent.keyboard('q');
await waitFor(() =>