make list text clickable to toggle
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user