test: add Playwright e2e smoke suite for punimtag dev
CI / skip-ci-check (pull_request) Successful in 4s
CI / docker-ci (pull_request) Successful in 5s
CI / secret-scan (pull_request) Successful in 10s
CI / e2e (pull_request) Successful in 46s

Add an e2e/ Playwright harness (via @levkin/playkit) that smoke-tests
the public DEV host: login page loads, sign-out never redirects to a
LAN host, FastAPI /health responds, and forgot-password mail lands in
Mailtrap with a public reset link (Kolby #56/#57 regressions).

Wire it into Gitea Actions as a new `e2e` job (self-hosted runner,
Chromium via Playwright), gated behind the existing skip-ci-check.
Add npm root scripts (install:e2e, test:e2e) and gitignore e2e build
artifacts (node_modules, reports, .env).
This commit is contained in:
2026-07-14 17:11:38 -04:00
parent 44f3d696e4
commit 0a9223c943
15 changed files with 563 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
import { type Page } from '@playwright/test';
import { BasePage, waitForVisible } from '@levkin/playkit';
export class AccountMenu extends BasePage {
constructor(page: Page, baseUrl: string) {
super(page, baseUrl);
}
async openMenu(): Promise<void> {
await this.click(this.page.getByLabel('Account menu'));
await waitForVisible(this.page.getByRole('button', { name: 'Sign out' }));
}
async signOut(): Promise<void> {
await this.openMenu();
await this.click(this.page.getByRole('button', { name: 'Sign out' }));
}
}
+18
View File
@@ -0,0 +1,18 @@
import { type Page } from '@playwright/test';
import { BasePage } from '@levkin/playkit';
export class LoginPage extends BasePage {
constructor(page: Page, baseUrl: string) {
super(page, baseUrl);
}
async openLogin(): Promise<void> {
await this.open('/login');
}
async signIn(email: string, password: string): Promise<void> {
await this.fill(this.page.locator('#email'), email);
await this.fill(this.page.locator('#password'), password);
await this.click(this.page.locator('button[type="submit"]'));
}
}