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

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

  async goto(productId: string) {
    await this.page.goto(`/product/product/${productId}`);
  }

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

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