Skip to content

Commit 0dd6818

Browse files
committed
✨(frontend) Adapt e2e test utils to the Keycloak 26.3 login page
Fix the keyCloakSignIn() function for the new login page. Signed-off-by: Fabre Florian <[email protected]>
1 parent eb225fc commit 0dd6818

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/frontend/apps/e2e/__tests__/app-impress/home.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ test.describe('Home page', () => {
131131

132132
// Keyclock login page
133133
await expect(
134-
page.locator('.login-pf-page-header').getByText('impress'),
134+
page.locator('.login-pf #kc-header-wrapper').getByText('impress'),
135135
).toBeVisible();
136136
});
137137
});

src/frontend/apps/e2e/__tests__/app-impress/utils-common.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export const keyCloakSignIn = async (
5656
const password = `password-e2e-${browserName}`;
5757

5858
await expect(
59-
page.locator('.login-pf-page-header').getByText('impress'),
59+
page.locator('.login-pf #kc-header-wrapper').getByText('impress'),
6060
).toBeVisible();
6161

6262
if (await page.getByLabel('Restart login').isVisible()) {
@@ -65,7 +65,7 @@ export const keyCloakSignIn = async (
6565

6666
await page.getByRole('textbox', { name: 'username' }).fill(login);
6767
await page.getByRole('textbox', { name: 'password' }).fill(password);
68-
await page.click('input[type="submit"]', { force: true });
68+
await page.click('button[type="submit"]', { force: true });
6969
};
7070

7171
export const randomName = (name: string, browserName: string, length: number) =>

0 commit comments

Comments
 (0)