From fa49215a5376833609b5d43cc4939f26eafb3ea7 Mon Sep 17 00:00:00 2001 From: Douglas Naphas Date: Mon, 15 Apr 2024 19:46:37 -0400 Subject: [PATCH] Define nextPageXPath earlier gh-577 --- itest/Links.itest.cjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/itest/Links.itest.cjs b/itest/Links.itest.cjs index 3df37e66..08451a93 100755 --- a/itest/Links.itest.cjs +++ b/itest/Links.itest.cjs @@ -432,6 +432,7 @@ const waitOptions = { timeout /*, visible: true */ }; return await pg.evaluate(() => window.location.href.split("#")[1]); }; // page to the lib we're checking + const nextPageXPath = `//button[text()="Next page"]`; while ((await currentPageNumber(liveReadPage)) < liveReadPageNumber) { await liveReadPage.waitForXPath(nextPageXPath); await liveReadPage.click("xpath/" + nextPageXPath); @@ -933,7 +934,6 @@ const waitOptions = { timeout /*, visible: true */ }; await page.goto(readLinkHref); const readThisPageAloudXPath = `//*[text()="Read aloud. Have a new person read each page, going around the Seder. Click a gray box to see the prompt."]`; await page.waitForXPath(readThisPageAloudXPath); - const nextPageXPath = `//button[text()="Next page"]`; await page.waitForXPath(nextPageXPath); const populatedScriptHref = (() => { const readLinkUrl = new URL(readLinkHref);