mirror of
https://github.com/s-frick/effigenix.git
synced 2026-03-28 13:49:36 +01:00
phase 1
This commit is contained in:
parent
6a672705c2
commit
e897f41a32
12 changed files with 129 additions and 31 deletions
|
|
@ -25,18 +25,19 @@ Konzept: [`docs/ui-testing-automation.md`](./docs/ui-testing-automation.md)
|
|||
|
||||
> Playwright-Setup in `test-automation/web-ui/`. API-Tests ohne Browser.
|
||||
|
||||
- [ ] `web-ui/package.json` finalisieren (Abhängigkeiten prüfen, ggf. pnpm workspace eintragen)
|
||||
- [ ] `web-ui/playwright.config.ts` validieren und anpassen
|
||||
- [ ] `web-ui/fixtures/auth.fixture.ts` implementieren und testen
|
||||
- [ ] `web-ui/fixtures/seed.fixture.ts` implementieren (DB-Reset-Strategie klären)
|
||||
- [ ] `web-ui/helpers/api-client.ts` typisiert implementieren
|
||||
- [ ] Backend `Dockerfile` erstellen (test-Profil, mit Seed-Daten)
|
||||
- [ ] `docker-compose.e2e.yml` validieren (DB → Backend → e2e-runner Healthchecks)
|
||||
- [ ] `web-ui/Dockerfile` validieren
|
||||
- [ ] Erste Spec: `tests/api/masterdata/categories.spec.ts` (TC-CAT, Issue #62)
|
||||
- [ ] Erste Spec: `tests/api/masterdata/suppliers.spec.ts` (TC-SUP, Issue #63)
|
||||
- [x] `web-ui/package.json` finalisieren (standalone, kein Workspace-Eintrag nötig)
|
||||
- [x] `web-ui/playwright.config.ts` validieren und anpassen
|
||||
- [x] `web-ui/fixtures/auth.fixture.ts` implementieren (viewer-Passwort: test1234)
|
||||
- [x] `web-ui/fixtures/seed.fixture.ts` implementieren (Strategie: Option B – UUID-Suffixe)
|
||||
- [x] `web-ui/helpers/api-client.ts` typisiert implementieren
|
||||
- [x] Backend `Dockerfile` erstellen (Multi-stage Maven + JRE, Profil via SPRING_PROFILES_ACTIVE)
|
||||
- [x] `docker-compose.e2e.yml` validieren (Profil auf `e2e` korrigiert, Viewer-Passwort angepasst)
|
||||
- [x] `web-ui/Dockerfile` korrigiert (standalone pnpm install, kein Workspace)
|
||||
- [x] `application-e2e.yml` + Liquibase-Changeset 039 (admin + viewer e2e-Benutzer)
|
||||
- [x] Erste Spec: `tests/api/masterdata/categories.spec.ts` (TC-CAT, Issue #62)
|
||||
- [x] Erste Spec: `tests/api/masterdata/suppliers.spec.ts` (TC-SUP-01 ACTIVE korrigiert, Issue #63)
|
||||
- [ ] End-to-end-Run lokal erfolgreich: `docker compose -f test-automation/docker-compose.e2e.yml up`
|
||||
- [ ] `just test-e2e` Recipe im `justfile` ergänzen
|
||||
- [x] `just test-e2e` Recipe im `justfile` ergänzt
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ services:
|
|||
context: ../backend
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
SPRING_PROFILES_ACTIVE: test
|
||||
SPRING_PROFILES_ACTIVE: e2e
|
||||
SPRING_DATASOURCE_URL: jdbc:postgresql://db:5432/effigenix
|
||||
SPRING_DATASOURCE_USERNAME: effigenix
|
||||
SPRING_DATASOURCE_PASSWORD: effigenix
|
||||
|
|
@ -45,7 +45,7 @@ services:
|
|||
TEST_USER_ADMIN: admin
|
||||
TEST_USER_ADMIN_PASS: admin123
|
||||
TEST_USER_VIEWER: viewer
|
||||
TEST_USER_VIEWER_PASS: viewer123
|
||||
TEST_USER_VIEWER_PASS: test1234
|
||||
depends_on:
|
||||
backend:
|
||||
condition: service_healthy
|
||||
|
|
|
|||
|
|
@ -1,20 +1,18 @@
|
|||
# E2E-Test-Runner (Playwright API-Tests, kein Browser)
|
||||
# Build-Context: Repo-Root (..)
|
||||
# Standalone – benötigt keine pnpm-Workspace-Konfiguration.
|
||||
|
||||
FROM mcr.microsoft.com/playwright:v1.51.0-noble
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# pnpm installieren
|
||||
RUN npm install -g pnpm@9
|
||||
|
||||
# Workspace-Root und e2e-Package-Manifest kopieren
|
||||
COPY frontend/package.json frontend/pnpm-workspace.yaml ./
|
||||
COPY test-automation/web-ui/package.json ./test-automation/web-ui/
|
||||
|
||||
# pnpm Install (nur Prod + Dev-Deps des e2e-Pakets)
|
||||
RUN pnpm install --frozen-lockfile
|
||||
|
||||
# Test-Code und Konfiguration kopieren
|
||||
COPY test-automation/web-ui/ ./test-automation/web-ui/
|
||||
|
||||
WORKDIR /app/test-automation/web-ui
|
||||
|
||||
ENTRYPOINT ["pnpm", "exec", "playwright", "test"]
|
||||
# Nur package.json zuerst für Layer-Caching
|
||||
COPY test-automation/web-ui/package.json ./
|
||||
RUN pnpm install --no-frozen-lockfile
|
||||
|
||||
# Test-Code kopieren
|
||||
COPY test-automation/web-ui/ ./
|
||||
|
||||
ENTRYPOINT ["pnpm", "exec", "playwright", "test", "--project=api"]
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ export const test = base.extend<AuthFixtures>({
|
|||
const res = await request.post('/api/auth/login', {
|
||||
data: {
|
||||
username: process.env.TEST_USER_VIEWER ?? 'viewer',
|
||||
password: process.env.TEST_USER_VIEWER_PASS ?? 'viewer123',
|
||||
password: process.env.TEST_USER_VIEWER_PASS ?? 'test1234',
|
||||
},
|
||||
});
|
||||
expect(res.status()).toBe(200);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ test.describe('TC-SUP: Lieferanten', () => {
|
|||
});
|
||||
expect(res.status()).toBe(201);
|
||||
const body = await res.json();
|
||||
expect(body.status).toBe('AKTIV');
|
||||
expect(body.status).toBe('ACTIVE');
|
||||
});
|
||||
|
||||
test('TC-SUP-02: Lieferant erscheint in Liste nach Erstellung', async ({ request, adminToken }) => {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"module": "CommonJS",
|
||||
"moduleResolution": "node16",
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue