Skip to content

A local-first personal finance app

516 B
Raw Blame
import type { Locator, Page } from '@playwright/test';

export class PayeesPage {
  readonly page: Page;
  readonly searchBox: Locator;

  constructor(page: Page) {
    this.page = page;

    this.searchBox = page.getByPlaceholder('Filter payees...');
  }

  async searchFor(payeeName: string) {
    await this.searchBox.fill(payeeName);
  }

  async rightClickNthPayee(idx: number) {
    await this.page
      .getByTestId('table')
      .getByTestId('row')
      .nth(idx)
      .click({ button: 'right' });
  }
}