Skip to content

Commit 10ab96b

Browse files
[WIP] Fix navigateToPIM method to handle closed pages in tests (#18)
* Initial plan * Add page closure check before waitForTimeout in navigateToPIM method Co-authored-by: bg-playground <259109604+bg-playground@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: bg-playground <259109604+bg-playground@users.noreply.github.com>
1 parent be8e5d2 commit 10ab96b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

automated-testing/pages/DashboardPage.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ export class DashboardPage {
7474
} catch (e) {
7575
// If click fails, try to open hamburger menu again and retry
7676
await this.ensureMenuVisible();
77+
// Check if page is still active before waiting
78+
if (this.page.isClosed && this.page.isClosed()) {
79+
throw new Error('Browser/page was closed unexpectedly during PIM navigation');
80+
}
7781
// Small wait before retrying
7882
await this.page.waitForTimeout(1000);
7983
}

0 commit comments

Comments
 (0)