⬆️ v3.0.0 (#704)

This commit is contained in:
Luke Vella 2023-06-19 17:17:00 +01:00 committed by GitHub
parent 735056f25f
commit c22b3abc4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
385 changed files with 19912 additions and 5250 deletions

View file

@ -0,0 +1,50 @@
import { Page } from "@playwright/test";
import { PollPage } from "tests/poll-page";
export class NewPollPage {
constructor(public readonly page: Page) {}
async goto() {
await this.page.goto("/new");
}
async createPollAndCloseDialog() {
const pollPage = await this.createPoll();
await pollPage.closeDialog();
return pollPage;
}
async createPoll() {
const page = this.page;
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"]');
// Select a few days
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="Jessie Smith"]', "John");
await page.type(
'[placeholder="jessie.smith@example.com"]',
"john.doe@example.com",
);
await page.click('text="Create poll"');
return new PollPage(page);
}
}