From bb20350a2a9fbb9fea2dbc33bb0db3a41c1fcfaa Mon Sep 17 00:00:00 2001 From: Teffen Ellis <592134+GirlBossRush@users.noreply.github.com> Date: Fri, 10 Apr 2026 17:15:03 +0200 Subject: [PATCH] web/e2e: accept options in NavigatorFixture.waitForPathname (#21507) Forward an optional second argument through to Playwright's `waitForURL`, so tests can set per-call timeouts and other options without abandoning the fixture helper. --- web/e2e/fixtures/NavigatorFixture.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/web/e2e/fixtures/NavigatorFixture.ts b/web/e2e/fixtures/NavigatorFixture.ts index 53d55cd850..645cd71f04 100644 --- a/web/e2e/fixtures/NavigatorFixture.ts +++ b/web/e2e/fixtures/NavigatorFixture.ts @@ -31,12 +31,15 @@ export class NavigatorFixture extends PageFixture { * * @param to The pathname or URL to wait for. */ - public waitForPathname = async (to: string | URL): Promise => { + public waitForPathname = async ( + to: string | URL, + options?: Parameters[1], + ): Promise => { const expectedPathname = typeof to === "string" ? to : to.pathname; this.logger.info(`Waiting for URL to change to ${expectedPathname}`); - await this.page.waitForURL(`**${expectedPathname}**`); + await this.page.waitForURL(`**${expectedPathname}**`, options); this.logger.info(`URL changed to ${this.page.url()}`); };