Files
calendar/apps/web/playwright/team-availability.e2e.ts
T
Eunjae LeeandGitHub 1d9d52ecf8 fix: add missing DataTableProvider (#20473)
* fix: add missing DataTableProvider

* add e2e test
2025-04-01 10:57:36 +01:00

42 lines
1.0 KiB
TypeScript

import { expect } from "@playwright/test";
import { test } from "./lib/fixtures";
test.describe.configure({ mode: "parallel" });
test.describe("Team Availability", () => {
test.beforeEach(async ({ page, users }) => {
const user = await users.create();
await user.apiLogin();
});
test.afterEach(async ({ users }) => {
await users.deleteAll();
});
test("page loads", async ({ page, users }) => {
const teamMatesObj = [
{ name: "teammate-1" },
{ name: "teammate-2" },
{ name: "teammate-3" },
{ name: "teammate-4" },
];
const owner = await users.create(
{ username: "pro-user", name: "pro-user" },
{
hasTeam: true,
teammates: teamMatesObj,
}
);
await owner.apiLogin();
await page.goto("/availability?type=team");
await page.waitForSelector('div[data-testid="data-table"] table');
const rows = await page.locator('div[data-testid="data-table"] table tbody tr').count();
expect(rows).toBe(teamMatesObj.length + 1);
});
});