import { type Page } from '@playwright/test'; import { BasePage } from '@levkin/playkit'; export class RegisterPage extends BasePage { constructor(page: Page, baseUrl: string) { super(page, baseUrl); } async openRegister(): Promise { await this.open('/register'); await this.page.waitForLoadState('domcontentloaded'); await this.page.locator('#email').waitFor({ state: 'visible' }); await this.page.waitForTimeout(300); } async register(input: { name: string; email: string; password: string; }): Promise { await this.fill(this.page.locator('#name'), input.name); await this.fill(this.page.locator('#email'), input.email); await this.fill(this.page.locator('#password'), input.password); await this.fill(this.page.locator('#confirmPassword'), input.password); await this.click(this.page.locator('button[type="submit"]')); } }