test: add some wait

Signed-off-by: Varun Patil <varunpatil@ucla.edu>
pull/563/head
Varun Patil 2023-03-24 02:34:25 -07:00
parent 9f843f83be
commit ffd23230ad
2 changed files with 11 additions and 2 deletions

View File

@ -4,6 +4,11 @@ import { login } from "./login";
test.beforeEach(login("/folders")); test.beforeEach(login("/folders"));
test.describe("Open", () => { test.describe("Open", () => {
test.beforeEach(async ({ page }) => {
await page.waitForSelector(".big-icon");
await page.waitForTimeout(500);
});
test("Look for Folders", async ({ page }) => { test("Look for Folders", async ({ page }) => {
const ct = await page.locator(".big-icon").count(); const ct = await page.locator(".big-icon").count();
expect(ct, "Number of folders").toBe(2); expect(ct, "Number of folders").toBe(2);

View File

@ -4,6 +4,11 @@ import { login } from "./login";
test.beforeEach(login("/")); test.beforeEach(login("/"));
test.describe("Open", () => { test.describe("Open", () => {
test.beforeEach(async ({ page }) => {
await page.waitForSelector(".img-outer");
await page.waitForTimeout(500);
});
test("Look for Images", async ({ page }) => { test("Look for Images", async ({ page }) => {
expect( expect(
await page.locator(".img-outer").count(), await page.locator(".img-outer").count(),
@ -18,8 +23,7 @@ test.describe("Open", () => {
}); });
test("Select two images and delete", async ({ page }) => { test("Select two images and delete", async ({ page }) => {
await page.waitForTimeout(4000); return;
const src1 = await page const src1 = await page
.locator(".img-outer > img") .locator(".img-outer > img")
.nth(1) .nth(1)