From cdf52cc4e53ea9b6f2558e10628bb7680dde957f Mon Sep 17 00:00:00 2001 From: Johannes Millan Date: Fri, 9 Jan 2026 17:27:30 +0100 Subject: [PATCH] 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. --- CLAUDE.md | 4 ++-- docker-compose.e2e.yaml | 7 ++----- docker-compose.supersync.yaml | 7 +++++++ package.json | 8 ++++---- 4 files changed, 15 insertions(+), 11 deletions(-) create mode 100644 docker-compose.supersync.yaml diff --git a/CLAUDE.md b/CLAUDE.md index d8c6a9b5c..5b44301b0 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -62,7 +62,7 @@ npm run test:file ```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 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 diff --git a/docker-compose.e2e.yaml b/docker-compose.e2e.yaml index 37bbb6f3d..10cd7b2c2 100644 --- a/docker-compose.e2e.yaml +++ b/docker-compose.e2e.yaml @@ -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: diff --git a/docker-compose.supersync.yaml b/docker-compose.supersync.yaml new file mode 100644 index 000000000..139f16ad9 --- /dev/null +++ b/docker-compose.supersync.yaml @@ -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' diff --git a/package.json b/package.json index d278f3c54..615c9225f 100644 --- a/package.json +++ b/package.json @@ -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",