Wire viewer-frontend Vitest into Gitea Actions, centralize DEV base URLs in env-defaults.json, expand playkit API catalog specs, and land auth/mail flows plus verify-email public-host redirect and idle-logout e2e hooks.
28 lines
907 B
TypeScript
28 lines
907 B
TypeScript
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<void> {
|
|
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<void> {
|
|
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"]'));
|
|
}
|
|
}
|