fix(web-app-shopware): click through Keycloak's logout confirmation

Shopware's in-app logout leaves the browser on Keycloak's end-session page, which asks 'Do you want to log out?' because the request carries no id_token_hint. The spec waited 60s for a password field that page never renders. The shared persona helper already handles this for inAppLogout; it is now exported so the role-local spec can use it too.

Evidence: the error-context of job 95119330653 shows heading "Logging out" and button "Logout" where the login form was expected.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
kevinveenbirkenbachandClaude Opus 5 committed 2026-08-17 18:02:29 +02:00
1 parent 46686d72ad
commit a30d67a63c
2 files changed
+4 -1

No files matched your search

@@ -200,4 +200,4 @@ async function inAppLogout(page) {
expect.soft(false, "no in-app logout control reachable on the current authenticated surface").toBe(true);
}
module.exports = { inAppLogout };
module.exports = { inAppLogout, confirmKeycloakLogoutIfPrompted };
@@ -3,6 +3,7 @@ const { resolveTimeout } = require("./timeouts");
const { decodeDotenvQuotedValue, normalizeBaseUrl , gotoOnion } = require("./personas");
const { performKeycloakLogin } = require("./personas/utils/keycloak");
const { confirmKeycloakLogoutIfPrompted } = require("./personas/utils/logout");
const appBaseUrl = normalizeBaseUrl(process.env.APP_BASE_URL || "");
const adminUsername = decodeDotenvQuotedValue(process.env.ADMIN_USERNAME || "");
@@ -74,6 +75,8 @@ test("administrator: admin login → catalogue → in-app logout", async ({ page
timeout: resolveTimeout(15_000),
});
await logout.click();
await page.waitForLoadState("domcontentloaded", { timeout: resolveTimeout(30_000) }).catch(() => {});
await confirmKeycloakLogoutIfPrompted(page);
await expect(
page.locator("input[type='password']:visible").first(),