From 70d89377ce1a65a073c2123d3f3678354f2020d2 Mon Sep 17 00:00:00 2001 From: Alan Buscaglia Date: Mon, 29 Jun 2026 22:43:09 +0200 Subject: [PATCH] test(ui): handle provider continue connection step --- ui/tests/providers/providers-page.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/ui/tests/providers/providers-page.ts b/ui/tests/providers/providers-page.ts index e1fab897c5..f8ab52d434 100644 --- a/ui/tests/providers/providers-page.ts +++ b/ui/tests/providers/providers-page.ts @@ -977,10 +977,13 @@ export class ProvidersPage extends BasePage { ): Promise { await this.verifyWizardModalOpen(); - const checkConnectionButton = this.page.getByRole("button", { - name: "Check connection", - exact: true, - }); + const testConnectionButton = this.page + .getByRole("button", { + name: "Check connection", + exact: true, + }) + .or(this.page.getByRole("button", { name: "Continue", exact: true })) + .first(); const launchStepReady = this.page .getByText("Account Connected!", { exact: true }) .or(this.page.getByText("Loading scan options...", { exact: true })) @@ -996,7 +999,7 @@ export class ProvidersPage extends BasePage { // after authentication; scan execution itself is covered by scans.spec.ts. try { await Promise.race([ - checkConnectionButton + testConnectionButton .or(launchStepReady) .or(connectionError) .first() @@ -1028,8 +1031,8 @@ export class ProvidersPage extends BasePage { // Provider-add E2E validates credentials and provider persistence only. // Launching one scan per provider made CI noisy and overloaded the backend; // scan execution itself is covered by scans.spec.ts. - if (await checkConnectionButton.isVisible().catch(() => false)) { - await checkConnectionButton.click(); + if (await testConnectionButton.isVisible().catch(() => false)) { + await testConnectionButton.click(); await this.waitForProviderReadyToClose(timeout); } else { await expect(launchStepReady).toBeVisible({ timeout });