From 1ba412ff6c0708fcabb7a481912cf8380a55457f Mon Sep 17 00:00:00 2001 From: Peter White <1788320+peterwhite@users.noreply.github.com> Date: Wed, 25 Mar 2026 17:37:43 +0100 Subject: [PATCH] Fix OneTrust issue for customer E2E test (#4137) --- packages/gitbook/e2e/customers.spec.ts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/packages/gitbook/e2e/customers.spec.ts b/packages/gitbook/e2e/customers.spec.ts index 0bbfefddd..47c5c8555 100644 --- a/packages/gitbook/e2e/customers.spec.ts +++ b/packages/gitbook/e2e/customers.spec.ts @@ -1,5 +1,18 @@ import { type TestsCase, runTestCases, waitForCookiesDialog } from './util'; +const ONE_HOUR_IN_MS = 60 * 60 * 1000; + +const CLOSED_ONETRUST_COOKIE_BANNER = [ + { + name: '__gitbook_cookie_granted', + value: 'no', + }, + { + name: 'OptanonAlertBoxClosed', + value: new Date(Date.now() - ONE_HOUR_IN_MS).toISOString(), + }, +]; + /** A list of test cases to run on the customers' docs sites. */ const testCases: TestsCase[] = [ { @@ -233,7 +246,11 @@ const testCases: TestsCase[] = [ name: 'run-ai-docs.nvidia.com', contentBaseURL: 'https://run-ai-docs.nvidia.com', tests: [ - // { name: 'Home', url: '/' } Temporarily skipped: this page is unstable in CI during Argos screenshots. + { + name: 'Home', + url: '/', + cookies: CLOSED_ONETRUST_COOKIE_BANNER, + }, { name: 'OG Image', url: '/~gitbook/ogimage/h17zQIFwy3MaafVNmItO', mode: 'image' }, ], },