chore: fixes to tests

This commit is contained in:
Stefan Benz
2024-11-19 11:15:27 +01:00
parent ab96a8eaae
commit adaf3e56df

View File

@@ -1,16 +1,16 @@
import {test as base} from "@playwright/test";
import { test as base } from "@playwright/test";
import dotenv from "dotenv";
import path from "path";
import {loginWithPassword} from "./login";
import {startChangePassword} from "./password";
import {changePasswordScreen, changePasswordScreenExpect} from "./password-screen";
import {PasswordUser} from "./user";
import { loginWithPassword } from "./login";
import { startChangePassword } from "./password";
import { changePasswordScreen, changePasswordScreenExpect } from "./password-screen";
import { PasswordUser } from "./user";
// Read from ".env" file.
dotenv.config({path: path.resolve(__dirname, ".env.local")});
dotenv.config({ path: path.resolve(__dirname, ".env.local") });
const test = base.extend<{ user: PasswordUser }>({
user: async ({page}, use) => {
user: async ({ page }, use) => {
const user = new PasswordUser({
email: "password-changed@example.com",
firstName: "first",
@@ -23,7 +23,7 @@ const test = base.extend<{ user: PasswordUser }>({
},
});
test("username and password changed login", async ({user, page}) => {
test("username and password changed login", async ({ user, page }) => {
// commented, fix in https://github.com/zitadel/zitadel/pull/8807
/*
const changedPw = "ChangedPw1!";
@@ -40,7 +40,7 @@ test("username and password changed login", async ({user, page}) => {
*/
});
test("password not with desired complexity", async ({user, page}) => {
test("password not with desired complexity", async ({ user, page }) => {
const changedPw1 = "change";
const changedPw2 = "chang";
await loginWithPassword(page, user.getUsername(), user.getPassword());