2024-10-28 19:44:50 +01:00
|
|
|
import {Page} from "@playwright/test";
|
|
|
|
|
|
|
|
|
|
export async function changePassword(page: Page, loginname: string, password: string) {
|
|
|
|
|
await page.goto('password/change?' + new URLSearchParams({loginName: loginname}));
|
2024-10-30 18:50:32 +01:00
|
|
|
await changePasswordScreen(page, password, password)
|
|
|
|
|
await page.getByTestId("submit-button").click();
|
2024-10-28 19:44:50 +01:00
|
|
|
}
|
|
|
|
|
|
2024-10-30 18:50:32 +01:00
|
|
|
async function changePasswordScreen(page: Page, password1: string, password2: string) {
|
|
|
|
|
await page.getByTestId('password-text-input').pressSequentially(password1);
|
|
|
|
|
await page.getByTestId('password-confirm-text-input').pressSequentially(password2);
|
2024-10-31 16:53:23 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function passwordScreen(page: Page, password: string) {
|
|
|
|
|
await page.getByTestId("password-text-input").pressSequentially(password);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function registerPasswordScreen(page: Page, password1: string, password2: string) {
|
|
|
|
|
await page.getByTestId('password-text-input').pressSequentially(password1);
|
|
|
|
|
await page.getByTestId('password-confirm-text-input').pressSequentially(password2);
|
|
|
|
|
}
|