memories/e2e/folders.spec.ts

24 lines
682 B
TypeScript

import { test, expect } from "@playwright/test";
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);
});
test("Open folder", async ({ page }) => {
await page.locator("text=Local").click();
await page.waitForTimeout(2000);
const elems = await page.locator(".img-outer").all();
expect(elems.length).toBeGreaterThanOrEqual(3);
});
});