Skip to content

Commit c7cfeb0

Browse files
donna-belsey-nhsankur-jain-nhs
authored andcommitted
VIA-574 AS/DB Ensure E2E tests wait for OTP page to load fully before proceeding
Fixes issue seen after NHS Login update where calls to /otp returns 404 with a 'transaction ID missing' error. (cherry picked from commit 948c888)
1 parent 1b423ab commit c7cfeb0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

e2e/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export const login = async (browser: Browser, nhsLoginUsername: string): Promise
6969
await page.getByRole("button", { name: "Continue" }).click();
7070
}
7171

72-
await page.waitForURL("**/enter-mobile-code", { timeout: 30000 });
72+
await page.waitForURL("**/enter-mobile-code", { waitUntil: "networkidle", timeout: 30000 });
7373
await page.getByRole("textbox", { name: "Security code" }).evaluate((input: HTMLInputElement, fillText) => {
7474
input.value = fillText;
7575
input.dispatchEvent(new Event("input"));

0 commit comments

Comments
 (0)