Skip to content

Commit 43afc4a

Browse files
Refresh lock file and e2e test fix (#2758)
* Refresh lock file... again * chore: updated e2e time again * chore: update wait time portal login page * WIP * WIP * WIP * chore: change method of waiting for login, removed waitFor --------- Co-authored-by: Paul Greywal <paul.greywal@gov.bc.ca>
1 parent 34fcace commit 43afc4a

File tree

5 files changed

+442
-1103
lines changed

5 files changed

+442
-1103
lines changed

e2e/pages/alcs/alcs-login-page.ts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,13 @@ export class ALCSLoginPage {
2222
}
2323

2424
async login(username: string, password: string) {
25-
// Click IDIR link and wait for navigation to external auth service
26-
// Use domcontentloaded since external auth services can be slow
27-
await Promise.all([
28-
this.page.waitForURL('**/auth/**', { timeout: 30000, waitUntil: 'domcontentloaded' }),
29-
this.idirLink.click(),
30-
]);
31-
32-
// Wait for login form to be ready
33-
await this.userIdTextbox.waitFor({ state: 'visible', timeout: 30000 });
34-
25+
// Click IDIR link - Playwright auto-waits for navigation
26+
await this.idirLink.click();
27+
28+
// Fill username - Playwright automatically waits for:
29+
// - Element to appear after SAML redirects
30+
// - Element to be visible, enabled, and stable
31+
// - Navigation to complete
3532
await this.userIdTextbox.fill(username);
3633
await this.passwordTextbox.fill(password);
3734
await this.continueButton.click();

e2e/pages/portal/parcels-page.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ export class ParcelsPage {
168168
await this.ownerSaveButton.click();
169169

170170
// Wait for dialog to disappear
171-
await this.ownerAddDialog.waitFor({ state: 'hidden', timeout: 5000 });
171+
await this.ownerAddDialog.waitFor({ state: 'hidden', timeout: 15000 });
172172
}
173173

174174
// Actions

e2e/pages/portal/portal-login-page.ts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,13 @@ export class PortalLoginPage {
2222
}
2323

2424
async logIn(username: string, password: string) {
25-
// Click login and wait for navigation to external auth service
26-
// Use domcontentloaded since external auth services can be slow
27-
await Promise.all([
28-
this.page.waitForURL('**/auth/**', { timeout: 30000, waitUntil: 'domcontentloaded' }),
29-
this.loginButton.click(),
30-
]);
31-
32-
// Wait for login form to be ready
33-
await this.userIdTextbox.waitFor({ state: 'visible', timeout: 30000 });
34-
25+
// Click login button - Playwright auto-waits for navigation
26+
await this.loginButton.click();
27+
28+
// Fill username - Playwright automatically waits for:
29+
// - Element to appear after SAML redirects
30+
// - Element to be visible, enabled, and stable
31+
// - Navigation to complete
3532
await this.userIdTextbox.fill(username);
3633
await this.passwordTextbox.fill(password);
3734
await this.continueButton.click();

e2e/playwright.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ export default defineConfig({
3232
trace: 'on-first-retry',
3333

3434
/* Increase timeouts for external auth services which can be slow */
35-
navigationTimeout: 30000,
36-
actionTimeout: 30000,
35+
navigationTimeout: 60000,
36+
actionTimeout: 60000,
3737
},
3838

3939
/* Configure projects for major browsers */

0 commit comments

Comments
 (0)