From: Alexander Moisseev Date: Fri, 24 Jul 2026 11:19:29 +0000 (+0300) Subject: [Test] WebUI: fix race in scan reconnect E2E test X-Git-Tag: 4.1.3~5^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=33ff6ba4459fb0add4b94f6fd4346731b04d5dfa;p=thirdparty%2Frspamd.git [Test] WebUI: fix race in scan reconnect E2E test After login, #navBar loses d-none from the /auth "complete" callback, which can fire before Bootstrap has finished the async fade-out of #connectDialog. The lingering .show then intercepts the immediate nav click, exhausting the 30s budget on WebKit under CI load. Wait for the dialog to be fully hidden before interacting with the nav, mirroring the explicit-wait pattern from 735609c1. --- diff --git a/test/playwright/tests/scan.spec.mjs b/test/playwright/tests/scan.spec.mjs index c573f6d7a8..049d3aba92 100644 --- a/test/playwright/tests/scan.spec.mjs +++ b/test/playwright/tests/scan.spec.mjs @@ -248,6 +248,11 @@ test.describe.serial("Scan flow across WebUI tabs", () => { // Login as read-only await login(page2, readOnlyPassword); await page2.waitForSelector("#navBar:not(.d-none)"); + // Bootstrap dismisses #connectDialog asynchronously (fade transition). + // navBar loses d-none from the /auth "complete" callback, which can fire + // before the modal finishes closing — the lingering .show then intercepts + // nav clicks (seen on WebKit under CI load). + await expect(page2.locator("#connectDialog")).toBeHidden({timeout: 10000}); // Go to Scan in RO await gotoTabLocal("scan"); @@ -264,6 +269,7 @@ test.describe.serial("Scan flow across WebUI tabs", () => { ); await page2.locator("#connectButton").click(); await page2.waitForSelector("#navBar:not(.d-none)"); + await expect(page2.locator("#connectDialog")).toBeHidden({timeout: 10000}); await p; // Expect classifiers to be populated