mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 14:42:17 +00:00
chore: add basic acceptance tests
This commit is contained in:
26
acceptance/tests/username-password-changed.spec.ts
Normal file
26
acceptance/tests/username-password-changed.spec.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import {test as base} from "@playwright/test";
|
||||
import {PasswordUser} from './user';
|
||||
import path from 'path';
|
||||
import dotenv from 'dotenv';
|
||||
|
||||
// Read from ".env" file.
|
||||
dotenv.config({path: path.resolve(__dirname, '.env.local')});
|
||||
|
||||
const test = base.extend<{ user: PasswordUser }>({
|
||||
user: async ({page}, use) => {
|
||||
const user = new PasswordUser({
|
||||
email: "password-changed@example.com",
|
||||
firstName: "first",
|
||||
lastName: "last",
|
||||
password: "Password1!",
|
||||
organization: "",
|
||||
});
|
||||
await user.ensure();
|
||||
await use(user);
|
||||
},
|
||||
});
|
||||
|
||||
test("username and password changed login", async ({user, page}) => {
|
||||
await user.changePassword(page, "ChangedPw1!")
|
||||
await user.login(page)
|
||||
});
|
||||
Reference in New Issue
Block a user