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.
38 lines
965 B
TypeScript
38 lines
965 B
TypeScript
import { expect, Page, test } from '@playwright/test';
|
|
import { AccountPageObject } from './account.po';
|
|
|
|
test.describe('Account Settings', () => {
|
|
let page: Page;
|
|
let account: AccountPageObject;
|
|
|
|
test.beforeAll(async ({ browser }) => {
|
|
page = await browser.newPage();
|
|
account = new AccountPageObject(page);
|
|
|
|
await account.setup();
|
|
})
|
|
|
|
test('user can update their profile name', async () => {
|
|
const name = 'John Doe';
|
|
|
|
await account.updateProfileName(name);
|
|
|
|
await page.waitForResponse((resp) => {
|
|
return resp.url().includes('accounts');
|
|
});
|
|
|
|
await expect(account.getProfileName()).toHaveText(name);
|
|
});
|
|
|
|
test('user can update their email', async () => {
|
|
const email = account.auth.createRandomEmail();
|
|
|
|
await account.updateProfileEmail(email);
|
|
|
|
const req = await page.waitForResponse((resp) => {
|
|
return resp.url().includes('auth/v1/user');
|
|
});
|
|
|
|
expect(req.status()).toBe(200);
|
|
});
|
|
}); |