message: chore: exponential backoff for all errors not just timeouts
diff: @@ -131,12 +131,12 @@ export async function waitForPageWithText(
  browser: any,
  path: string,
  text: string,
  - { intervalMs = 1000, maxLoadAttempts = 50 } = {},
  + { intervalMs = 1000, maxFindAttempts = 50 } = {},
  ) {
  - let loadAttempts = 0;
  + let findAttempts = 0;
  for (;;) {
  try {
  - const waitTimeMs = intervalMs * (Math.log10(loadAttempts + 1) + 1);
  + 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);
  @@ -150,16 +150,13 @@ export async function waitForPageWithText(
  break;
  } catch (error) {
  assertError(error);
  - if (error.message.match(EXPECTED_LOAD_ERRORS)) {
  - loadAttempts++;
  - if (loadAttempts >= maxLoadAttempts) {
  +
  + findAttempts++;
  + if (findAttempts >= maxFindAttempts) {
  throw new Error(
  `Failed to load page '${path}', max number of attempts reached`,
  );
  }
  - } else {
  - throw error;
  - }
  }
  }
  }
  