Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

787 B
Raw Blame
import type { Page } from "@playwright/test";
import { expect } from "@playwright/test";

export class InvitePage {
  constructor(public readonly page: Page) {}

  async addParticipant(name: string, email?: string) {
    const page = this.page;

    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"]', name);
    if (email) {
      await page.type('[placeholder="[email protected]"]', email);
    }

    await page.click("text='Save availability'");

    await expect(page.getByText("Your response has been saved")).toBeVisible();
    await page.click("button >> text='Back to poll'");
  }
}