rallly/tests/edit-options.spec.ts
Luke Vella 2ead375b42
Updated links model and poll page (#206)
* Improved sharing
* Updated desktop poll
2022-06-27 15:22:23 +01:00

18 lines
643 B
TypeScript

import { expect, test } from "@playwright/test";
test("should show warning when deleting options with votes in them", async ({
page,
}) => {
await page.goto("/demo");
await expect(page.locator('text="Lunch Meeting"')).toBeVisible();
await page.click("text='Manage'");
await page.click("text='Edit options'");
await page.click("[data-testid='specify-times-switch']");
await page.click("text='12:00 PM'");
await page.click("text='1:00 PM'");
await page.locator("div[role='dialog']").locator("text='Save'").click();
await expect(page.locator('text="Are you sure?"')).toBeVisible();
await page.click("text='Delete'");
});