diff --git a/libs/test-utils/playwright.config.ts b/libs/test-utils/playwright.config.ts index a0519db949..eb0673fbaf 100644 --- a/libs/test-utils/playwright.config.ts +++ b/libs/test-utils/playwright.config.ts @@ -4,7 +4,7 @@ const config: PlaywrightTestConfig = { testMatch: 'src/tests/**/*.pw.ts', timeout: 10000, use: { - actionTimeout: 2000, + actionTimeout: 5000, }, expect: { timeout: 3000, diff --git a/libs/test-utils/src/actions.ts b/libs/test-utils/src/actions.ts index c516393faf..5a3bf74d66 100644 --- a/libs/test-utils/src/actions.ts +++ b/libs/test-utils/src/actions.ts @@ -52,6 +52,13 @@ export function comboboxClear( this: ComboboxWrapper ): D['actionReturn'] { return runSequence([ + // Wait before clearing to ensure any previous operations have fully settled. + // This prevents a sporadic issue in Playwright Safari where the combobox will not clear + () => + this.ctx.driver.eval( + this.locator, + () => new Promise((resolve) => setTimeout(resolve, 200)) + ), () => this.ctx.driver.userClear(this.control()), () => this.ctx.driver.userBlur(this.control()), // Combobox only updates value on blur ]);