This update changes the number of retries in the Playwright configuration. Additionally, solid improvements have been made in the account settings, including better data semantics for testing, changes to email confirmation, and adding a new E2E test suite for accounts. The sign-up flow was updated and problems with multi-language support logic were fixed.
35 lines
1.1 KiB
TypeScript
35 lines
1.1 KiB
TypeScript
import { Page } from '@playwright/test';
|
|
import { AuthPageObject } from '../authentication/auth.po';
|
|
|
|
export class AccountPageObject {
|
|
private readonly page: Page;
|
|
public auth: AuthPageObject;
|
|
|
|
constructor(page: Page) {
|
|
this.page = page;
|
|
this.auth = new AuthPageObject(page);
|
|
}
|
|
|
|
async setup() {
|
|
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 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();
|
|
}
|
|
|
|
getProfileName() {
|
|
return this.page.locator('[data-test="account-dropdown-display-name"]');
|
|
}
|
|
|
|
getProfileEmail() {
|
|
return this.page.locator('[data-test="account-dropdown-email"]');
|
|
}
|
|
} |