diff --git a/README.md b/README.md index c18a772d8f..955329195e 100644 --- a/README.md +++ b/README.md @@ -308,12 +308,9 @@ If required, tests can run against `localhost:3000` by simply modifying `--host` #### working with (visual) tests more efficiently -(TODO: improve DX) - You may not always need to run tests exactly like on the CI environment. - To run specific suite, just change `test` script in `e2e/package.json` temporarily to `cypress run --spec cypress/integration/` -- To enable mounting `backend` code and live update, just use `e2e/docker-compose.cypress.dev.yml` instead. ## How to import records 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 deleted file mode 100644 index 0368e98613..0000000000 --- a/e2e/docker-compose.cypress.dev.yml +++ /dev/null @@ -1,14 +0,0 @@ -version: '2.1' - -services: - cypress: - image: cypress/included:12.17.0 - volumes: - - ./e2e:/tests - environment: - - NODE_ENV=test - - CI=${CI} - entrypoint: [''] - depends_on: - - ui - - record-editor 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": "",