Updated workflow for adding and updating participants (#500)

This commit is contained in:
Luke Vella 2023-02-09 17:56:30 +00:00
parent bac7db54f2
commit 5d7db848b8
58 changed files with 659 additions and 520 deletions

View file

@ -6,13 +6,16 @@ test("should be able to vote and comment on a poll", async ({ page }) => {
await expect(page.locator('text="Lunch Meeting"')).toBeVisible();
await page.click("text='New'");
await page.click('text="New"');
await page.click("data-testid=poll-option >> nth=0");
await page.click("data-testid=poll-option >> nth=1");
await page.click("data-testid=poll-option >> nth=3");
await page.type('[placeholder="Your name…"]', "Test user");
await page.click("text=Save");
await page.getByText("Continue").click();
await page.getByPlaceholder("Jessie Smith").type("Test user");
await page.getByText("Save").click();
await expect(page.locator("data-testid=user")).toBeVisible();
await expect(
page.locator("data-testid=participant-selector").locator("text=You"),

View file

@ -11,16 +11,20 @@ test("should be able to vote and comment on a poll", async ({ page }) => {
await expect(page.locator('text="Lunch Meeting"')).toBeVisible();
await page.type('[placeholder="Your name…"]', "Test user");
// There is a hidden checkbox (nth=0) that exists so that the behaviour of the form is consistent even
// when we only have a single option/checkbox.
await page.locator("data-testid=vote-selector >> nth=0").click();
await page.locator("data-testid=vote-selector >> nth=2").click();
await page.click("button >> text='Continue'");
await page.type('[placeholder="Jessie Smith"]', "Test user");
await page.click("text='Save'");
await expect(page.locator("text='Test user'")).toBeVisible();
await expect(
page.locator("data-testid=participant-row >> nth=4").locator("text=You"),
page.locator("data-testid=participant-row >> nth=0").locator("text=You"),
).toBeVisible();
await page.type(
"[placeholder='Leave a comment on this poll (visible to everyone)']",
"This is a comment!",