test(ui): verify no-scan state without extra wait

This commit is contained in:
Alan Buscaglia
2026-06-30 00:38:38 +02:00
parent aa9bc71294
commit 6bb42ab2a7
+10 -13
View File
@@ -1057,19 +1057,16 @@ export class ProvidersPage extends BasePage {
// connection step is enough; do not click "Continue"/"Check connection"
// because that performs provider-specific connectivity checks covered by
// dedicated scan/connection flows and can hang on external services.
if (!(await testConnectionButton.isVisible().catch(() => false))) {
try {
await Promise.race([
launchStepReady.waitFor({ state: "visible", timeout }),
this.wizardModal.waitFor({ state: "hidden", timeout }),
]);
} catch (error) {
const debugInfo = await this.getWizardDebugInfo();
throw new Error(
`Provider no-scan flow did not reach the connection or launch step.\n\n${debugInfo}`,
{ cause: error },
);
}
const reachedNoScanState =
(await testConnectionButton.isVisible().catch(() => false)) ||
(await launchStepReady.isVisible().catch(() => false)) ||
(await this.wizardModal.isHidden().catch(() => false));
if (!reachedNoScanState) {
const debugInfo = await this.getWizardDebugInfo();
throw new Error(
`Provider no-scan flow did not reach the connection or launch step.\n\n${debugInfo}`,
);
}
if (await this.wizardModal.isVisible().catch(() => false)) {