Files
the-other-dude/frontend/tests/e2e/pages/login.page.ts
Jason Staack b840047e19 feat: The Other Dude v9.0.1 — full-featured email system
ci: add GitHub Pages deployment workflow for docs site

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 19:30:44 -05:00

36 lines
832 B
TypeScript

import type { Page } from '@playwright/test'
/**
* Page Object Model for the login page (/login).
* Encapsulates selectors and actions for login form interaction.
*/
export class LoginPage {
constructor(private page: Page) {}
async goto() {
await this.page.goto('/login')
}
async login(email: string, password: string) {
await this.page.getByLabel(/email/i).fill(email)
await this.page.getByLabel(/password/i).fill(password)
await this.page.getByRole('button', { name: /sign in/i }).click()
}
get emailInput() {
return this.page.getByLabel(/email/i)
}
get passwordInput() {
return this.page.getByLabel(/password/i)
}
get submitButton() {
return this.page.getByRole('button', { name: /sign in/i })
}
get errorMessage() {
return this.page.locator('.text-error')
}
}