All checks were successful
Queue Release Build / prepare (push) Successful in 15s
Deploy Web Apps / deploy (push) Successful in 6m54s
Queue Release Build / build-windows (push) Successful in 16m6s
Queue Release Build / build-linux (push) Successful in 30m58s
Queue Release Build / finalize (push) Successful in 44s
isolated users, db backup, weird disconnect issues for long voice sessions,
32 lines
1.1 KiB
TypeScript
32 lines
1.1 KiB
TypeScript
import { type Page, type Locator } from '@playwright/test';
|
|
|
|
export class LoginPage {
|
|
readonly form: Locator;
|
|
readonly usernameInput: Locator;
|
|
readonly passwordInput: Locator;
|
|
readonly serverSelect: Locator;
|
|
readonly submitButton: Locator;
|
|
readonly errorText: Locator;
|
|
readonly registerLink: Locator;
|
|
|
|
constructor(private page: Page) {
|
|
this.form = page.locator('#login-username').locator('xpath=ancestor::div[contains(@class, "space-y-3")]').first();
|
|
this.usernameInput = page.locator('#login-username');
|
|
this.passwordInput = page.locator('#login-password');
|
|
this.serverSelect = page.locator('#login-server');
|
|
this.submitButton = this.form.getByRole('button', { name: 'Login' });
|
|
this.errorText = page.locator('.text-destructive');
|
|
this.registerLink = this.form.getByRole('button', { name: 'Register' });
|
|
}
|
|
|
|
async goto() {
|
|
await this.page.goto('/login');
|
|
}
|
|
|
|
async login(username: string, password: string) {
|
|
await this.usernameInput.fill(username);
|
|
await this.passwordInput.fill(password);
|
|
await this.submitButton.click();
|
|
}
|
|
}
|