From a30d67a63c5dab17f90871808e33d65f4e94d073 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Sun, 16 Aug 2026 19:34:04 +0200 Subject: [PATCH] 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) --- roles/test-e2e-playwright/files/personas/utils/logout.js | 2 +- roles/web-app-shopware/files/playwright/test-admin-native.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/roles/test-e2e-playwright/files/personas/utils/logout.js b/roles/test-e2e-playwright/files/personas/utils/logout.js index 4e36ca7655..9f91d92068 100644 --- a/roles/test-e2e-playwright/files/personas/utils/logout.js +++ b/roles/test-e2e-playwright/files/personas/utils/logout.js @@ -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 }; diff --git a/roles/web-app-shopware/files/playwright/test-admin-native.js b/roles/web-app-shopware/files/playwright/test-admin-native.js index 2663bdd2dc..f30055a0b3 100644 --- a/roles/web-app-shopware/files/playwright/test-admin-native.js +++ b/roles/web-app-shopware/files/playwright/test-admin-native.js @@ -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(),