From 111ad5c52ebe1e5bf6f6a126d77152b7d7094971 Mon Sep 17 00:00:00 2001 From: webzwo0i Date: Sat, 24 Sep 2022 16:16:31 +0200 Subject: [PATCH] fix cypress config --- .github/workflows/upgrade-from-latest-release.yml | 5 ++--- .github/workflows/windows.yml | 5 ++--- src/tests/frontend/cypress/cypress.config.js | 9 +++++++++ src/tests/frontend/cypress/cypress.json | 3 --- 4 files changed, 13 insertions(+), 9 deletions(-) create mode 100644 src/tests/frontend/cypress/cypress.config.js delete mode 100644 src/tests/frontend/cypress/cypress.json diff --git a/.github/workflows/upgrade-from-latest-release.yml b/.github/workflows/upgrade-from-latest-release.yml index 2c04faeff..339c3cd5c 100644 --- a/.github/workflows/upgrade-from-latest-release.yml +++ b/.github/workflows/upgrade-from-latest-release.yml @@ -90,11 +90,10 @@ jobs: run: cd src && npm test - name: Install Cypress - run: npm install cypress -g + run: cd src && npm install cypress - name: Run Etherpad & Test Frontend run: | node src/node/server.js & curl --connect-timeout 10 --max-time 20 --retry 5 --retry-delay 10 --retry-max-time 60 --retry-connrefused http://127.0.0.1:9001/p/test - cd src/tests/frontend - cypress run --spec cypress/integration/test.js --config-file cypress/cypress.json + ./src/node_modules/cypress/bin/cypress run --config-file src/tests/frontend/cypress/cypress.config.js diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 05d478650..ece684ffb 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -115,12 +115,11 @@ jobs: etherpad/src/bin/doc/package-lock.json - name: Install Cypress - run: npm install cypress -g + run: cd src && npm install cypress - name: Run Etherpad run: | cd etherpad node node_modules\ep_etherpad-lite\node\server.js & curl --connect-timeout 10 --max-time 20 --retry 5 --retry-delay 10 --retry-max-time 60 --retry-connrefused http://127.0.0.1:9001/p/test - cd src\tests\frontend - cypress run --spec cypress\integration\test.js --config-file cypress\cypress.json + src\node_modules\cypress\bin\cypress run --config-file src\tests\frontendcypress\cypress.config.js diff --git a/src/tests/frontend/cypress/cypress.config.js b/src/tests/frontend/cypress/cypress.config.js new file mode 100644 index 000000000..c49b90857 --- /dev/null +++ b/src/tests/frontend/cypress/cypress.config.js @@ -0,0 +1,9 @@ +const { defineConfig } = require('cypress') + +module.exports = defineConfig({ + e2e: { + baseUrl: "http://127.0.0.1:9001", + supportFile: false, + specPattern: 'src/tests/frontend/cypress/integration/**/*.js' + } +}) diff --git a/src/tests/frontend/cypress/cypress.json b/src/tests/frontend/cypress/cypress.json deleted file mode 100644 index 780d73fae..000000000 --- a/src/tests/frontend/cypress/cypress.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "baseUrl": "http://127.0.0.1:9001" -}