From aa9bc712944ca7854509d572cbc1f694141282c3 Mon Sep 17 00:00:00 2001 From: Alan Buscaglia Date: Tue, 30 Jun 2026 00:06:12 +0200 Subject: [PATCH] test(ui): accept wizard close while awaiting no-scan state --- ui/tests/providers/providers-page.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/tests/providers/providers-page.ts b/ui/tests/providers/providers-page.ts index 4c037d00f1..4bdf1ba087 100644 --- a/ui/tests/providers/providers-page.ts +++ b/ui/tests/providers/providers-page.ts @@ -1059,7 +1059,10 @@ export class ProvidersPage extends BasePage { // dedicated scan/connection flows and can hang on external services. if (!(await testConnectionButton.isVisible().catch(() => false))) { try { - await expect(launchStepReady).toBeVisible({ timeout }); + await Promise.race([ + launchStepReady.waitFor({ state: "visible", timeout }), + this.wizardModal.waitFor({ state: "hidden", timeout }), + ]); } catch (error) { const debugInfo = await this.getWizardDebugInfo(); throw new Error(