mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-23 13:56:18 +02:00
Improvements to mobile UI (#119)
This commit is contained in:
parent
f206d31083
commit
dde0fe8ea1
26 changed files with 971 additions and 317 deletions
28
tests/mobile-test.spec.ts
Normal file
28
tests/mobile-test.spec.ts
Normal file
|
@ -0,0 +1,28 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
|
||||
test("should be able to vote and comment on a poll", async ({ page }) => {
|
||||
await page.setViewportSize({ width: 375, height: 667 });
|
||||
await page.goto("/demo");
|
||||
|
||||
await expect(page.locator('text="Lunch Meeting Demo"')).toBeVisible();
|
||||
|
||||
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 expect(page.locator("text='Test user'")).toBeVisible();
|
||||
|
||||
await page.click("text=Edit");
|
||||
await page.click("data-testid=poll-option >> nth=1");
|
||||
await page.click("text=Save");
|
||||
await expect(page.locator("data-testid=poll-option >> nth=1 ")).toContainText(
|
||||
"2",
|
||||
);
|
||||
|
||||
await page.click("data-testid=delete-participant-button");
|
||||
await page.locator("button", { hasText: "Delete" }).click();
|
||||
await expect(page.locator("text='Test user'")).not.toBeVisible();
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue