Adjust personal-info.spec.ts to ensure user is created in user-profile test realm.
Signed-off-by: Thomas Darimont <thomas.darimont@googlemail.com>
This commit is contained in:
parent
f99c5f6df3
commit
5b8f4d3922
1 changed files with 6 additions and 5 deletions
|
@ -16,11 +16,11 @@ const realm = "user-profile";
|
|||
test.describe("Personal info page", () => {
|
||||
const user = "user-" + randomUUID();
|
||||
|
||||
test.beforeAll(() => createRandomUserWithPassword(user, "pwd"));
|
||||
test.beforeAll(async () => await inRealm(realm, () => createRandomUserWithPassword(user, "pwd")));
|
||||
test.afterAll(async () => await inRealm(realm, () => deleteUser(user)));
|
||||
|
||||
test("sets basic information", async ({ page }) => {
|
||||
await login(page, user, "pwd");
|
||||
await login(page, user, "pwd", realm);
|
||||
|
||||
await page.getByTestId("email").fill(`${user}@somewhere.com`);
|
||||
await page.getByTestId("firstName").fill("Erik");
|
||||
|
@ -116,15 +116,16 @@ test.describe("Personal info with userprofile enabled", () => {
|
|||
});
|
||||
|
||||
test.describe("Realm localization", () => {
|
||||
|
||||
test.beforeAll(() => enableLocalization());
|
||||
|
||||
test("change locale", async ({ page }) => {
|
||||
const user = await createRandomUserWithPassword(
|
||||
let user = await inRealm(realm, () => createRandomUserWithPassword(
|
||||
"user-" + randomUUID(),
|
||||
"pwd",
|
||||
);
|
||||
));
|
||||
|
||||
await login(page, user, "pwd");
|
||||
await login(page, user, "pwd", realm);
|
||||
await page.locator("#locale").click();
|
||||
page.getByRole("option").filter({ hasText: "Deutsch" });
|
||||
await page.getByRole("option", { name: "English" }).click();
|
||||
|
|
Loading…
Reference in a new issue