Skip to content

Commit

Permalink
update login page object flow and text selector checking
Browse files Browse the repository at this point in the history
  • Loading branch information
dualcnhq committed Jan 9, 2025
1 parent 0030a37 commit e5a4af8
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tests/page-objects/login-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@ export class LoginPage {
}

async assertAccountSettingsDisplayed() {
await this.page.waitForTimeout(3000);

await this.page.goto(accountSettings.url);
await this.page.waitForLoadState('networkidle', { timeout: 60000 });
await this.page.waitForURL(/settings=1/);

await expect(this.authTemplate).toBeVisible();

Expand All @@ -50,7 +48,7 @@ export class LoginPage {
).toBe('Account settings');

expect(await this.authTemplate.locator('form > p').innerText()).toBe(
'Please verify your password to access account settings.',
'To access your account settings, as an extra security measure, please enter your password.',
);

expect(
Expand All @@ -64,7 +62,7 @@ export class LoginPage {

async notLoggedIn() {
await this.page.goto(accountSettings.url);
await this.page.waitForLoadState('networkidle', { timeout: 60000 });
await this.page.waitForURL(/settings=1/);

await expect(this.authTemplate).not.toBeVisible();
expect(
Expand Down

0 comments on commit e5a4af8

Please sign in to comment.