test: check for field error instead of snackbar when editing user fails

This commit is contained in:
Jakub P.
2024-12-18 20:54:00 +01:00
committed by kasia.oczkowska
parent d898b2ab1a
commit 71e8928812
3 changed files with 219 additions and 252 deletions

View File

@@ -14,8 +14,12 @@ export class AdminCreateUserPage extends AuthenticatedPage {
this.roleInput = page.getByTestId('role.id-autocomplete');
this.createButton = page.getByTestId('create-button');
this.pageTitle = page.getByTestId('create-user-title');
this.invitationEmailInfoAlert = page.getByTestId('invitation-email-info-alert');
this.acceptInvitationLink = page.getByTestId('invitation-email-info-alert').getByRole('link');
this.invitationEmailInfoAlert = page.getByTestId(
'invitation-email-info-alert'
);
this.acceptInvitationLink = page
.getByTestId('invitation-email-info-alert')
.getByRole('link');
}
seed(seed) {

View File

@@ -13,9 +13,10 @@ export class AdminEditUserPage extends AuthenticatedPage {
super(page);
this.fullNameInput = page.getByTestId('full-name-input');
this.emailInput = page.getByTestId('email-input');
this.roleInput = page.getByTestId('role.id-autocomplete');
this.roleInput = page.getByTestId('roleId-autocomplete');
this.updateButton = page.getByTestId('update-button');
this.pageTitle = page.getByTestId('edit-user-title');
this.fieldError = page.locator('p[id$="-helper-text"]');
}
/**