From a1261664202228329409502f70f9a7bedc379995 Mon Sep 17 00:00:00 2001 From: Axel Bocciarelli Date: Mon, 24 Jul 2023 15:51:03 +0200 Subject: [PATCH] Wait for server to respond before running E2E tests --- .github/workflows/e2e-test.yml | 6 ++---- ui/cypress.config.js | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index bf4acfd55..13517ee4d 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -56,14 +56,12 @@ jobs: env: DISABLE_ESLINT_PLUGIN: true - - name: Start MXCuBE server - run: | - mxcubeweb-server -r ./test/HardwareObjectsMockup.xml/ --static-folder ./ui/build/ -L debug & - - name: Run Cypress uses: cypress-io/github-action@v5 with: working-directory: ui + start: mxcubeweb-server -r ./test/HardwareObjectsMockup.xml/ --static-folder ./ui/build/ -L debug + wait-on: "http://localhost:8081" - uses: actions/upload-artifact@v3 if: failure() diff --git a/ui/cypress.config.js b/ui/cypress.config.js index 50aa3bf45..8ddc9456f 100644 --- a/ui/cypress.config.js +++ b/ui/cypress.config.js @@ -2,7 +2,7 @@ const { defineConfig } = require('cypress'); module.exports = defineConfig({ e2e: { - baseUrl: 'http://127.0.0.1:8081', + baseUrl: 'http://localhost:8081', supportFile: 'cypress/support.js', }, screenshotsFolder: 'cypress/debug',