Implement lists module and dev login setup
This commit is contained in:
@@ -10,19 +10,19 @@ test("calendar CRUD happy path", async ({ page }) => {
|
||||
await page.goto("/calendar");
|
||||
await expect(page.getByRole("heading", { name: "Calendar" })).toBeVisible();
|
||||
|
||||
await page.getByLabel("Name").fill(calendarName);
|
||||
await page.getByLabel("Name", { exact: true }).fill(calendarName);
|
||||
await page.getByRole("button", { name: "Create calendar" }).click();
|
||||
await expect(page.getByDisplayValue(calendarName)).toBeVisible();
|
||||
await expect(page.getByLabel(`${calendarName} name`)).toBeVisible();
|
||||
|
||||
await page.getByRole("button", { name: "New event" }).click();
|
||||
await page.getByLabel("Title").fill(eventTitle);
|
||||
await page.getByLabel("Start").fill("2026-06-15T09:00");
|
||||
await page.getByLabel("End").fill("2026-06-15T10:00");
|
||||
await page.getByLabel("Title", { exact: true }).fill(eventTitle);
|
||||
await page.getByLabel("Start", { exact: true }).fill("2026-05-15T09:00");
|
||||
await page.getByLabel("End", { exact: true }).fill("2026-05-15T10:00");
|
||||
await page.getByRole("button", { name: "Save event" }).click();
|
||||
await expect(page.getByText(eventTitle)).toBeVisible();
|
||||
|
||||
await page.getByText(eventTitle).click();
|
||||
await page.getByLabel("Title").fill(editedTitle);
|
||||
await page.getByLabel("Title", { exact: true }).fill(editedTitle);
|
||||
await page.getByRole("button", { name: "Save event" }).click();
|
||||
await expect(page.getByText(editedTitle)).toBeVisible();
|
||||
|
||||
@@ -31,7 +31,7 @@ test("calendar CRUD happy path", async ({ page }) => {
|
||||
await expect(page.getByText(editedTitle)).toBeHidden();
|
||||
|
||||
await page.getByLabel(`${calendarName} name`).fill(renamedCalendarName);
|
||||
await expect(page.getByDisplayValue(renamedCalendarName)).toBeVisible();
|
||||
await expect(page.getByLabel(`${renamedCalendarName} name`)).toBeVisible();
|
||||
await page.getByRole("button", { name: `Delete ${renamedCalendarName}` }).click();
|
||||
await expect(page.getByDisplayValue(renamedCalendarName)).toBeHidden();
|
||||
await expect(page.getByLabel(`${renamedCalendarName} name`)).toBeHidden();
|
||||
});
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
import { expect, test } from "@playwright/test";
|
||||
|
||||
test("lists happy path", async ({ page }) => {
|
||||
const suffix = Date.now().toString();
|
||||
const listName = `E2E List ${suffix}`;
|
||||
const itemText = `E2E Item ${suffix}`;
|
||||
|
||||
await page.goto("/lists");
|
||||
await expect(page.getByRole("heading", { name: "Lists" })).toBeVisible();
|
||||
|
||||
await page.getByLabel("Type").fill("task");
|
||||
await page.getByLabel("Name").fill(listName);
|
||||
await page.getByRole("button", { name: "New list" }).click();
|
||||
await page.getByRole("link", { name: new RegExp(listName) }).click();
|
||||
|
||||
await page.getByLabel("Add item").fill(itemText);
|
||||
await page.keyboard.press("Enter");
|
||||
await expect(page.getByLabel(`${itemText} text`)).toBeVisible();
|
||||
|
||||
await page.getByLabel(`Complete ${itemText}`).check();
|
||||
await expect(page.getByLabel(`Complete ${itemText}`)).toBeChecked();
|
||||
|
||||
await page.getByRole("button", { name: "Archive list" }).click();
|
||||
await expect(page).toHaveURL(/\/lists$/);
|
||||
await expect(page.getByRole("link", { name: new RegExp(listName) })).toBeHidden();
|
||||
});
|
||||
Reference in New Issue
Block a user