make list text clickable to toggle

This commit is contained in:
2026-08-01 23:24:13 -04:00
parent 279cdb869d
commit a7544f837e
2 changed files with 13 additions and 2 deletions
+11
View File
@@ -34,6 +34,17 @@ test("a user can check off an item", async ({ page }) => {
await expect(row).toHaveClass(/is-checked/);
});
test("clicking an item's text toggles the checkbox", async ({ page }) => {
await registerAndLogin(page, "alice@example.com");
await createList(page, "Weekly shop");
await addItem(page, "Apple");
const row = page.locator(".item-row").filter({ hasText: "Apple" });
await row.locator(".item-copy").click();
await expect(row).toHaveClass(/is-checked/);
});
test("a user can edit an item via the actions modal", async ({ page }) => {
await registerAndLogin(page, "alice@example.com");
await createList(page, "Weekly shop");