From 5c5279965fd041907989415bad9e21b08a5f5a69 Mon Sep 17 00:00:00 2001 From: Lorenzo Natali Date: Thu, 5 Sep 2024 09:40:36 +0200 Subject: [PATCH] Fixed test build failures caused by ChromeHeadless height and a test dependent on window height (#10532) * Fixed test due to chrome headless issue in size * Fixed test due to chrome headless issue in size --- .../__tests__/withMediaVisibilityContainer-test.jsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/web/client/components/geostory/common/enhancers/__tests__/withMediaVisibilityContainer-test.jsx b/web/client/components/geostory/common/enhancers/__tests__/withMediaVisibilityContainer-test.jsx index 3b4ee7361f..404c4545f6 100644 --- a/web/client/components/geostory/common/enhancers/__tests__/withMediaVisibilityContainer-test.jsx +++ b/web/client/components/geostory/common/enhancers/__tests__/withMediaVisibilityContainer-test.jsx @@ -48,8 +48,8 @@ describe('withMediaVisibilityContainer HOC', () => { ReactDOM.render(
-
+ style={{ width: 10, height: 10, overflow: 'scroll' }}> +
@@ -64,11 +64,12 @@ describe('withMediaVisibilityContainer HOC', () => { it('scroll in view should render the actual component (lazy loading)', (done) => { const DEBOUNCE_TIME = 1; + // note: this test fails if the window is too small in height ReactDOM.render(
-
+ style={{ width: 10, height: 10, overflow: 'scroll' }}> +
)} debounceTime={DEBOUNCE_TIME}/>
, document.getElementById("container")); @@ -101,8 +102,8 @@ describe('withMediaVisibilityContainer HOC', () => { ReactDOM.render(
-
+ style={{ width: 10, height: 10, overflow: 'scroll' }}> +