1049ad8edf
* added test for the groups tab of the account-ui * simplified groups realm setup * fixed url * changed login to add realm * set account ui v3 as theme
16 lines
433 B
TypeScript
16 lines
433 B
TypeScript
import { Page } from "@playwright/test";
|
|
|
|
export const login = async (
|
|
page: Page,
|
|
username: string,
|
|
password: string,
|
|
realm?: string,
|
|
) => {
|
|
if (realm)
|
|
await page.goto(
|
|
process.env.CI ? `/realms/${realm}/account` : `/?realm=${realm}`,
|
|
);
|
|
await page.getByLabel("Username").fill(username);
|
|
await page.getByLabel("Password").fill(password);
|
|
await page.getByRole("button", { name: "Sign In" }).click();
|
|
};
|