Skip to content

Commit

Permalink
[Backport 2.x] Bump Cypress to version 12 (#234)
Browse files Browse the repository at this point in the history
* [Backport 2.x] Bump Cypress to version 12

Signed-off-by: Ryan Liang <[email protected]>

* Add cypress cmd

Signed-off-by: Ryan Liang <[email protected]>

---------

Signed-off-by: Ryan Liang <[email protected]>
  • Loading branch information
RyanL1997 authored Dec 19, 2023
1 parent 377c759 commit e4a1b5b
Show file tree
Hide file tree
Showing 4 changed files with 195 additions and 515 deletions.
36 changes: 36 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
const { defineConfig } = require('cypress');

module.exports = defineConfig({
video: true,
chromeWebSecurity: true,
fixturesFolder: '.cypress/fixtures',
screenshotsFolder: '.cypress/screenshots',
videosFolder: '.cypress/videos',
downloadsFolder: '.cypress/downloads',
viewportWidth: 2000,
viewportHeight: 1320,
requestTimeout: 60000,
responseTimeout: 60000,
defaultCommandTimeout: 60000,
//experimentalNetworkStubbing: true,
//experimentalMemoryManagement: true,
numTestsKeptInMemory: 10, //Default value 50, chrome crashes without lowering
env: {
opensearch: 'localhost:9200',
opensearchDashboards: 'localhost:5601',
security_enabled: true,
},
'cypress-watch-and-reload': {
watch: ['common/**', 'public/**', 'server/**'],
},
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./.cypress/plugins/index.js')(on, config);
},
baseUrl: 'http://localhost:5601',
specPattern: '.cypress/integration/**/*.spec.{js,jsx,ts,tsx}',
supportFile: '.cypress/support/index.js',
},
});
18 changes: 0 additions & 18 deletions cypress.json

This file was deleted.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
"test:jest": "../../node_modules/.bin/jest --config test/jest.config.js",
"test": "yarn test:jest",
"build": "yarn plugin-helpers build",
"plugin-helpers": "node ../../scripts/plugin_helpers"
"plugin-helpers": "node ../../scripts/plugin_helpers",
"cypress:run": "TZ=America/Los_Angeles cypress run",
"cypress:open": "TZ=America/Los_Angeles cypress open"
},
"dependencies": {
"brace": "0.11.1",
Expand All @@ -29,7 +31,7 @@
"@testing-library/user-event": "^13.1.9",
"@types/enzyme-adapter-react-16": "^1.0.6",
"@types/react-test-renderer": "^16.9.1",
"cypress": "^5.0.0",
"cypress": "^12.8.1",
"eslint": "^6.8.0",
"husky": "^4.2.5",
"jest-raw-loader": "^1.0.1",
Expand Down
Loading

0 comments on commit e4a1b5b

Please sign in to comment.