From 257a698dad83e66e6f26e5f90104385c5c275b98 Mon Sep 17 00:00:00 2001 From: Lene Gadewoll Date: Wed, 9 Oct 2024 09:48:54 +0200 Subject: [PATCH 1/2] test: add static colorMode for cypress test env - ensures that tests always run in LIGHT mode independent of system setting --- packages/eui/cypress/support/setup/mount.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eui/cypress/support/setup/mount.tsx b/packages/eui/cypress/support/setup/mount.tsx index a37ef2555af..8052c9789ce 100644 --- a/packages/eui/cypress/support/setup/mount.tsx +++ b/packages/eui/cypress/support/setup/mount.tsx @@ -29,7 +29,7 @@ const mountCommand = ( options: MountOptions = {} ): ReturnType => { const { providerProps } = options; - return cypressMount({children}); + return cypressMount({children}); }; // Export only the type to not confuse code-completion tools From d436a31168b18f1458bad18df5712eabaf3c3742 Mon Sep 17 00:00:00 2001 From: Lene Gadewoll Date: Thu, 10 Oct 2024 09:12:58 +0200 Subject: [PATCH 2/2] refactor: make the test env colorMode a default not a dictator --- packages/eui/cypress/support/setup/mount.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/eui/cypress/support/setup/mount.tsx b/packages/eui/cypress/support/setup/mount.tsx index 8052c9789ce..9c28216ab00 100644 --- a/packages/eui/cypress/support/setup/mount.tsx +++ b/packages/eui/cypress/support/setup/mount.tsx @@ -29,7 +29,11 @@ const mountCommand = ( options: MountOptions = {} ): ReturnType => { const { providerProps } = options; - return cypressMount({children}); + return cypressMount( + + {children} + + ); }; // Export only the type to not confuse code-completion tools