mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-29 15:38:52 +00:00
# Which Problems Are Solved We move the login code to the zitadel repo. # How the Problems Are Solved The login repo is added to ./login as a git subtree pulled from the dockerize-ci branch. Apart from the login code, this PR contains the changes from #10116 # Additional Context - Closes https://github.com/zitadel/typescript/issues/474 - Also merges #10116 - Merging is blocked by failing check because of: - https://github.com/zitadel/zitadel/pull/10134#issuecomment-3012086106 --------- Co-authored-by: Max Peintner <[email protected]> Co-authored-by: Max Peintner <[email protected]> Co-authored-by: Florian Forster <[email protected]>
28 lines
1.3 KiB
TypeScript
28 lines
1.3 KiB
TypeScript
import { Page } from "@playwright/test";
|
|
|
|
const passwordField = "password-text-input";
|
|
const passwordConfirmField = "password-confirm-text-input";
|
|
|
|
export async function registerUserScreenPassword(page: Page, firstname: string, lastname: string, email: string) {
|
|
await registerUserScreen(page, firstname, lastname, email);
|
|
await page.getByTestId("password-radio").click();
|
|
}
|
|
|
|
export async function registerUserScreenPasskey(page: Page, firstname: string, lastname: string, email: string) {
|
|
await registerUserScreen(page, firstname, lastname, email);
|
|
await page.getByTestId("passkey-radio").click();
|
|
}
|
|
|
|
export async function registerPasswordScreen(page: Page, password1: string, password2: string) {
|
|
await page.getByTestId(passwordField).pressSequentially(password1);
|
|
await page.getByTestId(passwordConfirmField).pressSequentially(password2);
|
|
}
|
|
|
|
export async function registerUserScreen(page: Page, firstname: string, lastname: string, email: string) {
|
|
await page.getByTestId("firstname-text-input").pressSequentially(firstname);
|
|
await page.getByTestId("lastname-text-input").pressSequentially(lastname);
|
|
await page.getByTestId("email-text-input").pressSequentially(email);
|
|
await page.getByTestId("privacy-policy-checkbox").check();
|
|
await page.getByTestId("tos-checkbox").check();
|
|
}
|