diff --git a/packages/gitbook/e2e/customers.spec.ts b/packages/gitbook/e2e/customers.spec.ts index d464f4b1a..4c7f417b7 100644 --- a/packages/gitbook/e2e/customers.spec.ts +++ b/packages/gitbook/e2e/customers.spec.ts @@ -360,7 +360,9 @@ const testCases: TestsCase[] = [ { name: 'docs.verifone.com', contentBaseURL: 'https://docs.verifone.com', - tests: [{ name: 'Home', url: '/', run: waitForCookiesDialog }], + // Verifone's custom Cookiebot integration races with and suppresses GitBook's built-in + // banner, so waitForCookiesDialog is not a stable invariant here. + tests: [{ name: 'Home', url: '/' }], }, // Deactivate it because of a custom Ask AI that causes flakiness. // { diff --git a/packages/gitbook/e2e/internal.spec.ts b/packages/gitbook/e2e/internal.spec.ts index 1d85c094c..64cbffbdb 100644 --- a/packages/gitbook/e2e/internal.spec.ts +++ b/packages/gitbook/e2e/internal.spec.ts @@ -2413,7 +2413,7 @@ const testCases: TestsCase[] = [ actions.nth(1).click(), ]); // Verify the new page would have opened with the expected URL - expect(newPage.url()).toContain('gitbook.com'); + await expect(newPage).toHaveURL(/gitbook\.com/); // Close it immediately to avoid navigation await newPage.close(); @@ -2561,7 +2561,7 @@ const testCases: TestsCase[] = [ openInNewTabButton.click(), ]); // Verify the new page would have opened with the expected URL - expect(newPage.url()).toContain('gitbook.gitbook.io'); + await expect(newPage).toHaveURL(/gitbook\.gitbook\.io/); // Close it immediately to avoid navigation await newPage.close(); },