From 080732c092c99960a0c76a9c67d876fd13b1cc40 Mon Sep 17 00:00:00 2001 From: Sanidhya Singh Date: Thu, 29 Jun 2023 22:20:01 +0530 Subject: [PATCH] Fix Cookie Popup from appearing in Screenshots (#4426) sanidhyas3s --- frontend/src/ts/test/test-ui.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/ts/test/test-ui.ts b/frontend/src/ts/test/test-ui.ts index 493e5f112..acf36f0ef 100644 --- a/frontend/src/ts/test/test-ui.ts +++ b/frontend/src/ts/test/test-ui.ts @@ -384,7 +384,10 @@ export async function screenshot(): Promise { let revealReplay = false; let revertCookie = false; - if (Misc.isElementVisible("#cookiePopupWrapper")) { + if ( + Misc.isElementVisible("#cookiePopupWrapper") || + document.contains(document.querySelector("#cookiePopupWrapper")) + ) { revertCookie = true; }