From 9c994b75f9434b5f832cbcee2f73bf7eb2576277 Mon Sep 17 00:00:00 2001 From: Keith Williams Date: Fri, 24 May 2024 22:44:29 -0400 Subject: [PATCH] Get rid of themeBasis warning in test suite --- apps/web/lib/app-providers-app-dir.tsx | 6 +++++- apps/web/lib/app-providers.tsx | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/web/lib/app-providers-app-dir.tsx b/apps/web/lib/app-providers-app-dir.tsx index 029fed2c0a5375..c813aa3f8c3703 100644 --- a/apps/web/lib/app-providers-app-dir.tsx +++ b/apps/web/lib/app-providers-app-dir.tsx @@ -195,7 +195,11 @@ function getThemeProviderProps(props: { const isBookingPageThemeSupportRequired = themeSupport === ThemeSupport.Booking; - if ((isBookingPageThemeSupportRequired || props.isEmbedMode) && !props.themeBasis) { + if ( + !process.env.NEXT_PUBLIC_IS_E2E && + (isBookingPageThemeSupportRequired || props.isEmbedMode) && + !props.themeBasis + ) { console.warn( "`themeBasis` is required for booking page theme support. Not providing it will cause theme flicker." ); diff --git a/apps/web/lib/app-providers.tsx b/apps/web/lib/app-providers.tsx index 1a478cff5213f2..caf1856c1efdc9 100644 --- a/apps/web/lib/app-providers.tsx +++ b/apps/web/lib/app-providers.tsx @@ -215,7 +215,7 @@ function getThemeProviderProps({ const isBookingPageThemeSupportRequired = themeSupport === ThemeSupport.Booking; const themeBasis = props.themeBasis; - if ((isBookingPageThemeSupportRequired || isEmbedMode) && !themeBasis) { + if (!process.env.NEXT_PUBLIC_IS_E2E && (isBookingPageThemeSupportRequired || isEmbedMode) && !themeBasis) { console.warn( "`themeBasis` is required for booking page theme support. Not providing it will cause theme flicker." );