Extract PassDashboard Playwright e2e suite into standalone repo
Some checks failed
E2E Tests / test (push) Has been cancelled
Some checks failed
E2E Tests / test (push) Has been cancelled
Copies the Playwright end-to-end suite out of the PassDashboard app repo so it can be run and deployed independently. Nothing was removed from the app repo - this is a copy. Carried over verbatim: tests/ (10 spec files, 4 helper modules, README) plus playwright.config.ts and .env.test.example. The suite drives the deployed app over HTTP and imports nothing from src/, which is what makes it standalone. New for this repo: - package.json with only the deps the suite actually uses (@playwright/test, allure-playwright, xlsx, typescript, @types/node) and the e2e scripts. - tsconfig.json covering tests/ - the app repo's tsconfig.app.json only included src/, so these files were never typechecked before. - .gitea/workflows/e2e-tests.yml for Gitea Actions. The app repo derived ENV from github.ref_name; that doesn't apply here since this repo has no per-environment branches, so the target is an explicit workflow_dispatch input and scheduled/push runs default to develop. Reports are uploaded as artifacts rather than deleted. - .gitignore and README covering local setup and the required CI secrets. The Jest unit tests under src/__tests__/ were deliberately left in the app repo: they import application source directly (AuthContext, ProtectedRoute, cryptoUtils, api) and cannot run without it. Verified: npx tsc --noEmit is clean and playwright collects all 43 tests across all 10 spec files. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
29
tests/helpers/allure.ts
Normal file
29
tests/helpers/allure.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { test } from '@playwright/test';
|
||||
|
||||
export function epic(name: string) {
|
||||
return test.info().annotations.push({ type: 'epic', description: name });
|
||||
}
|
||||
|
||||
export function feature(name: string) {
|
||||
return test.info().annotations.push({ type: 'feature', description: name });
|
||||
}
|
||||
|
||||
export function story(name: string) {
|
||||
return test.info().annotations.push({ type: 'story', description: name });
|
||||
}
|
||||
|
||||
export function severity(level: 'blocker' | 'critical' | 'normal' | 'minor' | 'trivial') {
|
||||
return test.info().annotations.push({ type: 'severity', description: level });
|
||||
}
|
||||
|
||||
export function tag(...tags: string[]) {
|
||||
tags.forEach(t => test.info().annotations.push({ type: 'tag', description: t }));
|
||||
}
|
||||
|
||||
export function description(text: string) {
|
||||
return test.info().annotations.push({ type: 'description', description: text });
|
||||
}
|
||||
|
||||
export function step<T>(name: string, body: () => Promise<T>): Promise<T> {
|
||||
return test.step(name, body);
|
||||
}
|
||||
Reference in New Issue
Block a user