e2e: make tests reusable for standalone

This commit is contained in:
Elian Doran
2026-04-19 11:32:52 +03:00
parent 7c53fe56be
commit 417228ebde
36 changed files with 148 additions and 79 deletions

View File

@@ -154,7 +154,7 @@ pnpm desktop:build # Build desktop application
### Test Organization
- **Server tests** (`apps/server/spec/`): Must run sequentially (shared database state)
- **Client tests** (`apps/client/src/`): Can run in parallel
- **E2E tests** (`apps/server-e2e/`): Use Playwright for integration testing
- **E2E tests** (`packages/trilium-e2e/`): Shared Playwright tests, run via `pnpm --filter server e2e` or `pnpm --filter client-standalone e2e`
- **ETAPI tests** (`apps/server/spec/etapi/`): External API contract tests
**Pattern**: When adding new API endpoints, add tests in `spec/etapi/` following existing patterns (see `search.spec.ts`).

View File

@@ -82,7 +82,7 @@ jobs:
require-healthy: true
- name: Run Playwright tests
run: TRILIUM_DOCKER=1 TRILIUM_PORT=8082 pnpm --filter=server-e2e e2e
run: TRILIUM_DOCKER=1 TRILIUM_PORT=8082 pnpm --filter=server e2e
- name: Upload Playwright trace
if: failure()

View File

@@ -73,14 +73,14 @@ jobs:
sleep 10
- name: Server end-to-end tests
run: pnpm --filter server-e2e e2e
run: pnpm --filter server e2e
- name: Upload test report
if: failure()
uses: actions/upload-artifact@v7
with:
name: e2e report ${{ matrix.arch }}
path: apps/server-e2e/test-output
path: apps/server/test-output
- name: Kill the server
if: always()