Merge branch 'main' into AUT-1380

This commit is contained in:
Jakub P.
2025-01-14 17:03:39 +01:00
34 changed files with 994 additions and 570 deletions

View File

@@ -1,3 +1,5 @@
const { expect } = require('@playwright/test');
const { faker } = require('@faker-js/faker');
const { AuthenticatedPage } = require('../authenticated-page');
@@ -11,7 +13,7 @@ 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(
@@ -20,6 +22,8 @@ export class AdminCreateUserPage extends AuthenticatedPage {
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) {
@@ -32,4 +36,8 @@ export class AdminCreateUserPage extends AuthenticatedPage {
email: faker.internet.email().toLowerCase(),
};
}
async expectCreateUserSuccessAlertToBeVisible() {
await expect(this.createUserSuccessAlert).toBeVisible();
}
}