feat: #58 Tests E2E Playwright — 44 tests desktop + CI
- playwright.config.ts: chromium-desktop + chromium-mobile - tests/e2e/obsigate.spec.ts: 44 tests en 11 sections - Dashboard & Navigation (8 tests) - Full-Text Search (10 tests) - File Navigation & Viewer (5 tests) - Editor (4 tests: Forge, basic modal, Ctrl+S) - Mermaid Diagrams (2 tests) - PDF Export, Dark Mode, Responsive, Saved Searches - Keyboard Shortcuts (Ctrl+K, /, Escape) - Context Menu directory - CI: nouveau job e2e dans .gitea/workflows/ci.yml - ROADMAP: #58 marque FAIT - .gitignore: node_modules, test-results, playwright-report
This commit is contained in:
@@ -99,3 +99,52 @@ jobs:
|
||||
|
||||
- name: Verify image
|
||||
run: docker images obsigate:ci
|
||||
|
||||
# ── E2E Tests (Playwright) ─────────────────────────────────────────
|
||||
e2e:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "20"
|
||||
|
||||
- name: Install Playwright
|
||||
run: |
|
||||
npm ci
|
||||
npx playwright install --with-deps chromium
|
||||
|
||||
- name: Start ObsiGate
|
||||
run: |
|
||||
docker run -d --name obsigate-e2e -p 2020:8080 \
|
||||
-v $(pwd)/test_vault:/vaults/TestVault \
|
||||
-v $(pwd)/test_dir:/vaults/TestDir \
|
||||
-e VAULT_1_NAME=TestVault \
|
||||
-e VAULT_1_PATH=/vaults/TestVault \
|
||||
-e DIR_1_NAME=TestDir \
|
||||
-e DIR_1_PATH=/vaults/TestDir \
|
||||
-e OBSIGATE_AUTH_ENABLED=false \
|
||||
obsigate:ci
|
||||
# Wait for health check
|
||||
for i in $(seq 1 30); do
|
||||
curl -s http://localhost:2020/api/health && break
|
||||
sleep 1
|
||||
done
|
||||
|
||||
- name: Run E2E tests
|
||||
run: npx playwright test --project=chromium-desktop --reporter=list
|
||||
|
||||
- name: Upload test results
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: playwright-report
|
||||
path: playwright-report/
|
||||
retention-days: 7
|
||||
|
||||
- name: Cleanup
|
||||
if: always()
|
||||
run: docker rm -f obsigate-e2e
|
||||
|
||||
Reference in New Issue
Block a user