fix(e2e): split docker-compose files for standalone webdav tests

docker-compose.e2e.yaml was failing when used standalone because the
supersync service only had a port override without a base definition.
Split into separate files so e2e:docker:webdav works without errors.
This commit is contained in:
Johannes Millan 2026-01-09 17:27:30 +01:00
parent ca98d2c936
commit cdf52cc4e5
4 changed files with 15 additions and 11 deletions

View file

@ -62,7 +62,7 @@ npm run test:file <filepath>
```bash
# Start the server first
docker compose -f docker-compose.yaml -f docker-compose.e2e.yaml up -d supersync && \
docker compose -f docker-compose.yaml -f docker-compose.supersync.yaml up -d supersync && \
until curl -s http://localhost:1901/health > /dev/null 2>&1; do sleep 1; done && \
echo 'Server ready!'
@ -70,7 +70,7 @@ npm run test:file <filepath>
npx playwright test --config e2e/playwright.config.ts --grep @supersync --reporter=line
# Stop server when done
docker compose -f docker-compose.yaml -f docker-compose.e2e.yaml down supersync
docker compose -f docker-compose.yaml -f docker-compose.supersync.yaml down supersync
```
- Linting: `npm run lint` - ESLint for TypeScript, Stylelint for SCSS

View file

@ -1,10 +1,7 @@
# Docker Compose override for E2E tests
# Uses port 1901 so tests can run while dev server uses 1900
# Note: For supersync tests, use both files: -f docker-compose.yaml -f docker-compose.e2e.yaml
# This file is standalone for app/webdav tests only
services:
supersync:
ports: !override
- '1901:1900'
# Angular development server for E2E tests
app:
build:

View file

@ -0,0 +1,7 @@
# Docker Compose override for SuperSync E2E tests
# Uses port 1901 so tests can run while dev server uses 1900
# Usage: docker compose -f docker-compose.yaml -f docker-compose.supersync.yaml up -d supersync
services:
supersync:
ports: !override
- '1901:1900'

View file

@ -60,11 +60,11 @@
"e2e:report": "PLAYWRIGHT_HTML_REPORT=1 npx playwright test --config e2e/playwright.config.ts",
"e2e:webdav": "docker compose up -d webdav && ./scripts/wait-for-webdav.sh && npm run e2e -- --grep webdav; docker compose down",
"e2e:webdav:file": "docker compose up -d webdav && ./scripts/wait-for-webdav.sh && E2E_VERBOSE=true npx playwright test --config e2e/playwright.config.ts --reporter=list; docker compose down",
"e2e:supersync": "docker compose -f docker-compose.yaml -f docker-compose.e2e.yaml up -d --build supersync && echo 'Waiting for SuperSync server...' && until curl -s http://localhost:1901/health > /dev/null 2>&1; do sleep 1; done && echo 'Server ready!' && npm run e2e -- --grep @supersync --workers=3; docker compose -f docker-compose.yaml -f docker-compose.e2e.yaml down supersync",
"e2e:supersync:file": "docker compose -f docker-compose.yaml -f docker-compose.e2e.yaml up -d --build supersync && echo 'Waiting for SuperSync server...' && until curl -s http://localhost:1901/health > /dev/null 2>&1; do sleep 1; done && echo 'Server ready!' && E2E_VERBOSE=true npx playwright test --config e2e/playwright.config.ts --reporter=list --workers=3",
"e2e:supersync:down": "docker compose -f docker-compose.yaml -f docker-compose.e2e.yaml down supersync",
"e2e:supersync": "docker compose -f docker-compose.yaml -f docker-compose.supersync.yaml up -d --build supersync && echo 'Waiting for SuperSync server...' && until curl -s http://localhost:1901/health > /dev/null 2>&1; do sleep 1; done && echo 'Server ready!' && npm run e2e -- --grep @supersync --workers=3; docker compose -f docker-compose.yaml -f docker-compose.supersync.yaml down supersync",
"e2e:supersync:file": "docker compose -f docker-compose.yaml -f docker-compose.supersync.yaml up -d --build supersync && echo 'Waiting for SuperSync server...' && until curl -s http://localhost:1901/health > /dev/null 2>&1; do sleep 1; done && echo 'Server ready!' && E2E_VERBOSE=true npx playwright test --config e2e/playwright.config.ts --reporter=list --workers=3",
"e2e:supersync:down": "docker compose -f docker-compose.yaml -f docker-compose.supersync.yaml down supersync",
"e2e:docker": "docker compose -f docker-compose.e2e.yaml up -d app && ./scripts/wait-for-app.sh && E2E_BASE_URL=http://localhost:${APP_PORT:-4242} npm run e2e; docker compose -f docker-compose.e2e.yaml down",
"e2e:docker:webdav": "docker compose -f docker-compose.e2e.yaml up -d && ./scripts/wait-for-app.sh && ./scripts/wait-for-webdav.sh && E2E_BASE_URL=http://localhost:${APP_PORT:-4242} npm run e2e; docker compose -f docker-compose.e2e.yaml down",
"e2e:docker:webdav": "docker compose -f docker-compose.e2e.yaml up -d app webdav && ./scripts/wait-for-app.sh && ./scripts/wait-for-webdav.sh && E2E_BASE_URL=http://localhost:${APP_PORT:-4242} npm run e2e; docker compose -f docker-compose.e2e.yaml down",
"electron": "NODE_ENV=PROD electron .",
"electron:build": "tsc -p electron/tsconfig.electron.json",
"electron:watch": "tsc -p electron/tsconfig.electron.json --watch",