Skip to content

Commit

Permalink
#6022 try to fix angular test
Browse files Browse the repository at this point in the history
Fixes #6022
  • Loading branch information
novikov82 committed Nov 14, 2024
1 parent 5eafd68 commit 88bc867
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions functionalTests/designer/surface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -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("");
});

0 comments on commit 88bc867

Please sign in to comment.