mirror of
https://github.com/lukevella/rallly.git
synced 2025-08-06 09:59:00 +02:00
First public commit
This commit is contained in:
commit
e05cd62e53
228 changed files with 17717 additions and 0 deletions
39
tests/create-poll.spec.ts
Normal file
39
tests/create-poll.spec.ts
Normal file
|
@ -0,0 +1,39 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
|
||||
test("should be able to create a new poll", async ({ page, context }) => {
|
||||
await context.addCookies([
|
||||
{
|
||||
name: "rallly_cookie_consent",
|
||||
value: "1",
|
||||
url: "http://localhost",
|
||||
},
|
||||
]);
|
||||
await page.goto("/new");
|
||||
// // // Find an element with the text 'About Page' and click on it
|
||||
await page.type('[placeholder="Monthly Meetup"]', "Monthly Meetup");
|
||||
// click on label to focus on input
|
||||
await page.click('text="Location"');
|
||||
await page.keyboard.type("Joe's Coffee Shop");
|
||||
|
||||
await page.click('text="Description"');
|
||||
|
||||
await page.keyboard.type("This is a test description");
|
||||
|
||||
await page.click('text="Continue"');
|
||||
|
||||
await page.click('[title="Next month"]');
|
||||
|
||||
await page.click("text=/^5$/");
|
||||
await page.click("text=/^7$/");
|
||||
await page.click("text=/^10$/");
|
||||
await page.click("text=/^15$/");
|
||||
|
||||
await page.click('text="Continue"');
|
||||
|
||||
await page.type('[placeholder="John Doe"]', "John");
|
||||
await page.type('[placeholder="john.doe@email.com"]', "john.doe@email.com");
|
||||
|
||||
await page.click('text="Create poll"');
|
||||
|
||||
await expect(page.locator('text="Monthly Meetup"')).toBeVisible();
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue