Refactor account settings and e2e tests
Renamed several components related to account settings and updated corresponding data-test selectors for more clarity. Adjusted e2e tests to reflect these changes and added tests for new functionalities, like changing password and deleting account. In addition, generator description in monorepo configuration was simplified. Minor changes were also made to e2e test utilities for better error handling.
This commit is contained in:
@@ -14,15 +14,27 @@ export class AccountPageObject {
|
||||
return this.auth.signUpFlow('/home/settings');
|
||||
}
|
||||
|
||||
async updateProfileName(name: string) {
|
||||
await this.page.locator('[data-test="update-account-name-form"] input').fill(name);
|
||||
await this.page.locator('[data-test="update-account-name-form"] button').click();
|
||||
async updateName(name: string) {
|
||||
await this.page.fill('[data-test="update-account-name-form"] input', name);
|
||||
await this.page.click('[data-test="update-account-name-form"] button');
|
||||
}
|
||||
|
||||
async updateProfileEmail(email: string) {
|
||||
await this.page.locator('[data-test="account-email-form-email-input"]').fill(email);
|
||||
await this.page.locator('[data-test="account-email-form-repeat-email-input"]').fill(email);
|
||||
await this.page.locator('[data-test="account-email-form"] button').click();
|
||||
async updateEmail(email: string) {
|
||||
await this.page.fill('[data-test="account-email-form-email-input"]', email);
|
||||
await this.page.fill('[data-test="account-email-form-repeat-email-input"]', email);
|
||||
await this.page.click('[data-test="account-email-form"] button');
|
||||
}
|
||||
|
||||
async updatePassword(password: string) {
|
||||
await this.page.fill('[data-test="account-password-form-password-input"]', password);
|
||||
await this.page.fill('[data-test="account-password-form-repeat-password-input"]', password);
|
||||
await this.page.click('[data-test="account-password-form"] button');
|
||||
}
|
||||
|
||||
async deleteAccount() {
|
||||
await this.page.click('[data-test="delete-account-button"]');
|
||||
await this.page.fill('[data-test="delete-account-input-field"]', 'DELETE');
|
||||
await this.page.click('[data-test="confirm-delete-account-button"]');
|
||||
}
|
||||
|
||||
getProfileName() {
|
||||
|
||||
Reference in New Issue
Block a user