chore: add data-testid's and some additional testing

This commit is contained in:
Stefan Benz
2024-10-30 18:50:32 +01:00
parent 9af39ac1bc
commit 9c041cc46f
22 changed files with 227 additions and 113 deletions

View File

@@ -2,11 +2,11 @@ import {Page} from "@playwright/test";
export async function changePassword(page: Page, loginname: string, password: string) {
await page.goto('password/change?' + new URLSearchParams({loginName: loginname}));
await changePasswordScreen(page, loginname, password, password)
await page.getByRole('button', {name: 'Continue'}).click();
await changePasswordScreen(page, password, password)
await page.getByTestId("submit-button").click();
}
async function changePasswordScreen(page: Page, loginname: string, password1: string, password2: string) {
await page.getByLabel('New Password *').pressSequentially(password1);
await page.getByLabel('Confirm Password *').pressSequentially(password2);
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);
}