import type { Page } from "@playwright/test";

export class AuditEntryListPage {
  private page: Page;
  constructor(page: Page) {
    this.page = page;
  }

  async goto() {
    await this.page.goto("/audit");
  }

  get heading() {
    return this.page.getByRole("heading", { name: /audit log/i });
  }

  get table() {
    return this.page.getByRole("table");
  }

  getRow(text: string) {
    return this.page.getByRole("row").filter({ hasText: text });
  }
}
