diff --git a/cypress/e2e/pairingTool.cy.js b/cypress/e2e/pairingTool.cy.js index 700b070..a047d44 100644 --- a/cypress/e2e/pairingTool.cy.js +++ b/cypress/e2e/pairingTool.cy.js @@ -1,11 +1,12 @@ -describe('The Pairing Tool', () => { +describe('The Pairing Tool', { testIsolation: false }, () => { it('Open the main page', () => { - cy.visit(Cypress.env('url')) + const pairingToolUrl = Cypress.env('url') + cy.visit(pairingToolUrl) + cy.contains('Pairing Tool') }) it('Upload a workshop CSV file', () => { - cy.contains('Pairing Tool') cy.get('input[type=file]').attachFile('workshop-csv-file.csv') }) diff --git a/package.json b/package.json index 7774a10..a06d535 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "test": "react-scripts test", "test:e2e": "cypress run --env url=http://localhost:3000/pairing-tool/", "smoke": "cypress run --env url=https://codebar.github.io/pairing-tool/", - "cypress": "cypress open", + "cypress": "cypress open --env url=http://localhost:3000/pairing-tool/", "clean": "eslint \"src/**/*.js\" --fix", "start": "react-scripts start", "build": "react-scripts build" @@ -35,7 +35,7 @@ "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^14.4.3", - "cypress": "^11.2.0", + "cypress": "^12.0.1", "cypress-file-upload": "^5.0.8", "react-scripts": "5.0.1" }, diff --git a/yarn.lock b/yarn.lock index 5fa8f56..66563ea 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3994,10 +3994,10 @@ cypress-file-upload@^5.0.8: resolved "https://registry.yarnpkg.com/cypress-file-upload/-/cypress-file-upload-5.0.8.tgz#d8824cbeaab798e44be8009769f9a6c9daa1b4a1" integrity sha512-+8VzNabRk3zG6x8f8BWArF/xA/W0VK4IZNx3MV0jFWrJS/qKn8eHfa5nU73P9fOQAgwHFJx7zjg4lwOnljMO8g== -cypress@^11.2.0: - version "11.2.0" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-11.2.0.tgz#63edef8c387b687066c5493f6f0ad7b9ced4b2b7" - integrity sha512-u61UGwtu7lpsNWLUma/FKNOsrjcI6wleNmda/TyKHe0dOBcVjbCPlp1N6uwFZ0doXev7f/91YDpU9bqDCFeBLA== +cypress@^12.0.1: + version "12.0.1" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-12.0.1.tgz#3a51a38b2f162256c7226e68e902cfe1750e3d92" + integrity sha512-I1Ag5RsPEINfUlQtV6xwkd6ktJuu5QGiKZ3pFa/IXjcyCY6I7CH3gOz0juLOhg/LXOPrQtZH35ulcWDQohyyEA== dependencies: "@cypress/request" "^2.88.10" "@cypress/xvfb" "^1.2.4"