chore: add another exponential delay to wait for the page to load too
Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
@@ -139,8 +139,11 @@ export async function waitForPageWithText(
|
||||
const waitTimeMs = intervalMs * (Math.log10(findAttempts + 1) + 1);
|
||||
console.log(`Attempting to load page at ${path}, waiting ${waitTimeMs}`);
|
||||
await new Promise(resolve => setTimeout(resolve, waitTimeMs));
|
||||
|
||||
await browser.visit(path);
|
||||
|
||||
await new Promise(resolve => setTimeout(resolve, waitTimeMs));
|
||||
|
||||
const escapedText = text.replace(/"|\\/g, '\\$&');
|
||||
browser.assert.evaluate(
|
||||
`Array.from(document.querySelectorAll("*")).some(el => el.textContent === "${escapedText}")`,
|
||||
|
||||
Reference in New Issue
Block a user