test: use updated selector for create admin button in installation form
This commit is contained in:

committed by
kasia.oczkowska

parent
54f509ee38
commit
3de18ab46f
@@ -1,4 +1,4 @@
|
||||
import { BasePage } from "./base-page";
|
||||
import { BasePage } from './base-page';
|
||||
const { faker } = require('@faker-js/faker');
|
||||
const { expect } = require('@playwright/test');
|
||||
|
||||
@@ -14,8 +14,10 @@ export class AdminSetupPage extends BasePage {
|
||||
this.fullNameTextField = this.page.getByTestId('fullName-text-field');
|
||||
this.emailTextField = this.page.getByTestId('email-text-field');
|
||||
this.passwordTextField = this.page.getByTestId('password-text-field');
|
||||
this.repeatPasswordTextField = this.page.getByTestId('repeat-password-text-field');
|
||||
this.createAdminButton = this.page.getByTestId('signUp-button');
|
||||
this.repeatPasswordTextField = this.page.getByTestId(
|
||||
'repeat-password-text-field'
|
||||
);
|
||||
this.createAdminButton = this.page.getByTestId('installation-button');
|
||||
this.invalidFields = this.page.locator('p.Mui-error');
|
||||
this.successAlert = this.page.getByTestId('success-alert');
|
||||
}
|
||||
@@ -59,7 +61,10 @@ export class AdminSetupPage extends BasePage {
|
||||
}
|
||||
|
||||
async expectSuccessMessageToContainLoginLink() {
|
||||
await expect(await this.successAlert.locator('a')).toHaveAttribute('href', '/login');
|
||||
await expect(await this.successAlert.locator('a')).toHaveAttribute(
|
||||
'href',
|
||||
'/login'
|
||||
);
|
||||
}
|
||||
|
||||
generateUser() {
|
||||
@@ -69,7 +74,7 @@ export class AdminSetupPage extends BasePage {
|
||||
fullName: faker.person.fullName(),
|
||||
email: faker.internet.email(),
|
||||
password: faker.internet.password(),
|
||||
wronglyRepeatedPassword: faker.internet.password()
|
||||
wronglyRepeatedPassword: faker.internet.password(),
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user