From 88bc867f3bb1d5931df467ad38a20b9216094c83 Mon Sep 17 00:00:00 2001 From: Aleksey Novikov Date: Thu, 14 Nov 2024 09:52:29 +0300 Subject: [PATCH] #6022 try to fix angular test Fixes #6022 --- functionalTests/designer/surface.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/functionalTests/designer/surface.ts b/functionalTests/designer/surface.ts index 00c18bd2aa..0ea1735c20 100644 --- a/functionalTests/designer/surface.ts +++ b/functionalTests/designer/surface.ts @@ -398,11 +398,10 @@ test("Check page adorner state is restored after shrink and stretch", async (t) }); test("Popup position", async (t) => { const setCreatorTop = ClientFunction((top) => { - const el = document.getElementById("survey-creator") as HTMLElement; - el.style.top = top; - document.body.insertBefore(el, document.body.firstChild); + const el = document.querySelector(".svc-creator") as HTMLElement; + el.style.marginTop = top; }); - await setCreatorTop("400px"); + await setCreatorTop("200px"); await t.resizeWindow(1400, 900); await setJSON({ @@ -415,6 +414,6 @@ test("Popup position", async (t) => { }); await t.click('button[title="Survey settings"]'); await t.click('[data-name="locale"]'); - await t.expect(ClientFunction(() => { return document.querySelector('[data-name="locale"] .sv-popup__container')?.getBoundingClientRect().top; })()).gte(400); - await setCreatorTop(0); + await t.expect(ClientFunction(() => { return document.querySelector('[data-name="locale"] .sv-popup__container')?.getBoundingClientRect().top; })()).gte(200); + await setCreatorTop(""); }); \ No newline at end of file