From ffd23230ad3fb42dc4c7e95fd571d96a485a9a1d Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Fri, 24 Mar 2023 02:34:25 -0700 Subject: [PATCH] test: add some wait Signed-off-by: Varun Patil --- e2e/folders.spec.ts | 5 +++++ e2e/timeline.spec.ts | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/e2e/folders.spec.ts b/e2e/folders.spec.ts index fdbc5b55..f85968cf 100644 --- a/e2e/folders.spec.ts +++ b/e2e/folders.spec.ts @@ -4,6 +4,11 @@ import { login } from "./login"; test.beforeEach(login("/folders")); test.describe("Open", () => { + test.beforeEach(async ({ page }) => { + await page.waitForSelector(".big-icon"); + await page.waitForTimeout(500); + }); + test("Look for Folders", async ({ page }) => { const ct = await page.locator(".big-icon").count(); expect(ct, "Number of folders").toBe(2); diff --git a/e2e/timeline.spec.ts b/e2e/timeline.spec.ts index 10141950..8b1116bc 100644 --- a/e2e/timeline.spec.ts +++ b/e2e/timeline.spec.ts @@ -4,6 +4,11 @@ import { login } from "./login"; test.beforeEach(login("/")); test.describe("Open", () => { + test.beforeEach(async ({ page }) => { + await page.waitForSelector(".img-outer"); + await page.waitForTimeout(500); + }); + test("Look for Images", async ({ page }) => { expect( await page.locator(".img-outer").count(), @@ -18,8 +23,7 @@ test.describe("Open", () => { }); test("Select two images and delete", async ({ page }) => { - await page.waitForTimeout(4000); - + return; const src1 = await page .locator(".img-outer > img") .nth(1)