Skip to content

Commit 30c2969

Browse files
committed
Try to fix blinking test
1 parent 3ad8825 commit 30c2969

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

screenshots/popup.spec.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { test, expect } from "@playwright/test";
22
import { frameworks, url, initSurvey, compareScreenshot, resetFocusToBody } from "../e2e/helper";
3-
43
const title = "Popup Screenshot";
54

65
const json = {
@@ -298,7 +297,10 @@ frameworks.forEach(framework => {
298297
await compareScreenshot(page, ".sv-popup.sv-single-select-list .sv-popup__container", "popup-into-modal-popup.png");
299298
});
300299

301-
test("Popup search width", async ({ page }) => {
300+
test("Popup search width", async ({ browser }) => {
301+
const context = await browser.newContext();
302+
const page = await context.newPage();
303+
await page.goto(`${url}${framework}`);
302304
await page.setViewportSize({ width: 1000, height: 600 });
303305
await initSurvey(page, framework, {
304306
showQuestionNumbers: "on",
@@ -320,6 +322,7 @@ frameworks.forEach(framework => {
320322

321323
await page.click(".sv-dots__item");
322324
await compareScreenshot(page, ".sv-popup .sv-popup__container", "popup-search-width.png");
325+
context.close();
323326
});
324327

325328
test("Popup with subitems", async ({ page }) => {

0 commit comments

Comments
 (0)