test: use new alert in create role and create user tests
This commit is contained in:

committed by
kasia.oczkowska

parent
7a8dc68592
commit
53d95366e9
@@ -1,3 +1,5 @@
|
||||
const { expect } = require('@playwright/test');
|
||||
|
||||
const { faker } = require('@faker-js/faker');
|
||||
const { AuthenticatedPage } = require('../authenticated-page');
|
||||
|
||||
@@ -11,11 +13,17 @@ export class AdminCreateUserPage 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.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');
|
||||
this.createUserSuccessAlert = page.getByTestId('create-user-success-alert');
|
||||
this.fieldError = page.locator('p[id$="-helper-text"]');
|
||||
}
|
||||
|
||||
seed(seed) {
|
||||
@@ -28,4 +36,8 @@ export class AdminCreateUserPage extends AuthenticatedPage {
|
||||
email: faker.internet.email().toLowerCase(),
|
||||
};
|
||||
}
|
||||
|
||||
async expectCreateUserSuccessAlertToBeVisible() {
|
||||
await expect(this.createUserSuccessAlert).toBeVisible();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user