From 03b6338d242a84eb3996a973cb487b4afb811ba6 Mon Sep 17 00:00:00 2001 From: karolina-siemieniuk-morawska Date: Wed, 24 Jan 2024 10:11:08 +0100 Subject: [PATCH] e2e: improve local setup * ref: cern-sis/issues-inspire#393 --- cypress-tests.sh | 3 ++- e2e/cypress.config.js | 4 +--- e2e/cypress/plugins/index.js | 5 ----- e2e/docker-compose.cypress.dev.yml | 2 +- e2e/docker-compose.cypress.yml | 2 +- e2e/package.json | 2 +- 6 files changed, 6 insertions(+), 12 deletions(-) diff --git a/cypress-tests.sh b/cypress-tests.sh index b79e95d148..cbb2be37dd 100644 --- a/cypress-tests.sh +++ b/cypress-tests.sh @@ -1,3 +1,4 @@ sh cypress-tests-setup.sh sh cypress-tests-data.sh -sh cypress-tests-run.sh +sh cypress-tests-run-chrome.sh +sh cypress-tests-run-firefox.sh diff --git a/e2e/cypress.config.js b/e2e/cypress.config.js index 75ddcd12c5..b169b51d0b 100644 --- a/e2e/cypress.config.js +++ b/e2e/cypress.config.js @@ -5,7 +5,7 @@ module.exports = defineConfig({ videosFolder: 'cypress/__videos__', screenshotsFolder: 'cypress/__screenshots__', env: { - inspirehep_url: 'localhost:3000', + inspirehep_url: 'localhost:8080', mobile_viewport_width: 375, mobile_viewport_height: 667, }, @@ -20,7 +20,5 @@ module.exports = defineConfig({ }, specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}', experimentalRunAllSpecs: true, - experimentalMemoryManagement: true, - numTestsKeptInMemory: 0 }, }) diff --git a/e2e/cypress/plugins/index.js b/e2e/cypress/plugins/index.js index d1ea88c25c..eaa060cc61 100644 --- a/e2e/cypress/plugins/index.js +++ b/e2e/cypress/plugins/index.js @@ -18,11 +18,6 @@ const { module.exports = (on, config) => { on('before:browser:launch', (browser = {}, launchOptions) => { - if (browser.name == 'chrome') { - launchOptions.args.push('--disable-gpu') - launchOptions.args.push('--disable-dev-shm-usage'); - launchOptions.args.push('--js-flags="--max_old_space_size=8192 --max_semi_space_size=8192"'); - } return launchOptions }), addMatchImageSnapshotPlugin(on, config); diff --git a/e2e/docker-compose.cypress.dev.yml b/e2e/docker-compose.cypress.dev.yml index 0368e98613..8c6566c1de 100644 --- a/e2e/docker-compose.cypress.dev.yml +++ b/e2e/docker-compose.cypress.dev.yml @@ -2,7 +2,7 @@ version: '2.1' services: cypress: - image: cypress/included:12.17.0 + image: cypress/included:13 volumes: - ./e2e:/tests environment: diff --git a/e2e/docker-compose.cypress.yml b/e2e/docker-compose.cypress.yml index b59483c5ae..607b2ece7c 100644 --- a/e2e/docker-compose.cypress.yml +++ b/e2e/docker-compose.cypress.yml @@ -2,7 +2,7 @@ version: '2.1' services: cypress: - image: cypress/included:12.17.0 + image: cypress/included:13 volumes: - ./e2e:/tests environment: diff --git a/e2e/package.json b/e2e/package.json index 08724196e5..7cda09e957 100644 --- a/e2e/package.json +++ b/e2e/package.json @@ -5,7 +5,7 @@ "main": "index.js", "scripts": { "test:dev": "cypress open", - "test": "cypress run", + "test": "cypress run --browser chrome", "cypress": "cypress" }, "author": "",