build(e2e): make new sync test setup work

This commit is contained in:
Johannes Millan 2025-07-18 20:05:20 +02:00
parent ed2d99a852
commit 3a237b02c5
6 changed files with 12 additions and 22 deletions

View file

@ -1,16 +0,0 @@
services:
webdav:
image: hacdias/webdav:latest
ports:
- '2345:2345'
volumes:
- ./webdav.yaml:/config.yml:ro
- ./e2e-webdav-data:/data
environment:
- WEBDAV_CONFIG=/config.yml
healthcheck:
test: ['CMD', 'wget', '--quiet', '--tries=1', '--spider', 'http://localhost:2345/']
interval: 10s
timeout: 5s
retries: 3
start_period: 10s

View file

@ -20,4 +20,10 @@ services:
- '2345:2345'
volumes:
- ./webdav.yaml:/config.yml:ro
- ./data:/data
- ${WEBDAV_DATA_DIR:-./data}:/data
healthcheck:
test: ['CMD', 'wget', '--quiet', '--tries=1', '--spider', 'http://localhost:2345/']
interval: 10s
timeout: 5s
retries: 3
start_period: 10s

View file

@ -30,8 +30,8 @@ module.exports = {
.pause(100)
.setValue(sel.baseUrlInput, 'http://localhost:2345')
.setValue(sel.userNameInput, 'alice')
.setValue(sel.passwordInput, 'alice')
.setValue(sel.userNameInput, 'admin')
.setValue(sel.passwordInput, 'admin')
.setValue(sel.syncFolder, '/')
.pause(100)

View file

@ -22,7 +22,7 @@ module.exports = {
browserName: 'chrome',
chromeOptions: {
args: [
'--headless',
// '--headless',
'--disable-gpu',
'--window-size=1280,800',
'--no-sandbox',

View file

@ -26,7 +26,7 @@ module.exports = {
.pause(3000)
// .noError()
.assert.not.elementPresent('.sync-btn mat-icon.spin')
.assert.textContains('.sync-btn mat-icon', 'check')
.assert.textContains('.sync-btn mat-icon:nth-of-type(2)', 'check')
.end();
},
};

View file

@ -55,7 +55,7 @@
"droid": "npm run buildFrontend:stageWeb:unminified && npx cap sync",
"e2e": "cross-env TZ='Europe/Berlin' DETECT_CHROMEDRIVER_VERSION=true SKIP_POST_INSTALL=true npm i -D chromedriver --legacy-peer-deps && tsc --project e2e/tsconfig.e2e.json && start-server-and-test 'ng serve --no-live-reload' http://localhost:4200 'nightwatch -c ./e2e/nightwatch.conf.js --suiteRetries 1 --retries 1'",
"e2e:tag": "killall chromedriver; rm -R ./.tmp/out-tsc; tsc --project e2e/tsconfig.e2e.json && nightwatch -c ./e2e/nightwatch.conf.js --suiteRetries 0 --retries 0 --tag ",
"e2e:webdav": "docker compose -f docker-compose.webdav-e2e.yaml up -d && sleep 5 && npm run e2e:tag webdav; docker compose -f docker-compose.webdav-e2e.yaml down",
"e2e:webdav": "WEBDAV_DATA_DIR=./e2e-webdav-data docker compose up -d webdav && sleep 5 && npm run e2e:tag webdav; docker compose down",
"electron": "NODE_ENV=PROD electron .",
"electron:build": "tsc -p electron/tsconfig.electron.json",
"electron:watch": "tsc -p electron/tsconfig.electron.json --watch",