This commit is contained in:
Max Peintner
2024-11-15 15:05:38 +01:00
parent 88620ad697
commit 39335c3ed4
3 changed files with 12 additions and 13 deletions

View File

@@ -59,7 +59,7 @@ class User {
} }
// wait for projection of user // wait for projection of user
await page.waitForTimeout(3000) await page.waitForTimeout(3000);
} }
async remove() { async remove() {
@@ -169,7 +169,7 @@ export class PasswordUserWithOTP extends User {
} }
// wait for projection of user // wait for projection of user
await page.waitForTimeout(2000) await page.waitForTimeout(2000);
} }
public getCode() { public getCode() {
@@ -203,7 +203,7 @@ export class PasskeyUser extends User {
this.authenticatorId = authId; this.authenticatorId = authId;
// wait for projection of user // wait for projection of user
await page.waitForTimeout(2000) await page.waitForTimeout(2000);
} }
public async remove() { public async remove() {

View File

@@ -24,16 +24,16 @@ const test = base.extend<{ user: PasswordUser }>({
}); });
test("username and password changed login", async ({ user, page }) => { test("username and password changed login", async ({ user, page }) => {
const changedPw = "ChangedPw1!" const changedPw = "ChangedPw1!";
await loginWithPassword(page, user.getUsername(), user.getPassword()) await loginWithPassword(page, user.getUsername(), user.getPassword());
// wait for projection of token // wait for projection of token
await page.waitForTimeout(2000) await page.waitForTimeout(2000);
await changePassword(page, user.getUsername(), changedPw) await changePassword(page, user.getUsername(), changedPw);
await loginScreenExpect(page, user.getFullName()); await loginScreenExpect(page, user.getFullName());
await loginWithPassword(page, user.getUsername(), changedPw) await loginWithPassword(page, user.getUsername(), changedPw);
await loginScreenExpect(page, user.getFullName()); await loginScreenExpect(page, user.getFullName());
}); });

View File

@@ -1,7 +1,6 @@
import { test as base } from "@playwright/test"; import { test as base } from "@playwright/test";
import dotenv from "dotenv"; import dotenv from "dotenv";
import path from "path"; import path from "path";
import { loginScreenExpect, loginWithPassword } from "./login";
import { OtpType, PasswordUserWithOTP } from "./user"; import { OtpType, PasswordUserWithOTP } from "./user";
// Read from ".env" file. // Read from ".env" file.