diff --git a/cypress.config.ts b/cypress.config.ts new file mode 100644 index 000000000..94c25fb52 --- /dev/null +++ b/cypress.config.ts @@ -0,0 +1,30 @@ +import { defineConfig } from 'cypress' + +export default defineConfig({ + e2e: { + "defaultCommandTimeout": 60000, + "requestTimeout": 60000, + "responseTimeout": 60000, + "baseUrl": "http://localhost:5601", + "reporter": "cypress-multi-reporters", + "reporterOptions": { + "configFile": "reporter-config.json" + }, + "viewportWidth": 2000, + "viewportHeight": 1320, + "env": { + "openSearchUrl": "http://localhost:9200", + "SECURITY_ENABLED": false, + "AGGREGATION_VIEW": false, + "username": "admin", + "password": "admin", + "ENDPOINT_WITH_PROXY": false, + "MANAGED_SERVICE_ENDPOINT": false, + "VISBUILDER_ENABLED": true, + "DATASOURCE_MANAGEMENT_ENABLED": false, + "ML_COMMONS_DASHBOARDS_ENABLED": true, + "WAIT_FOR_LOADER_BUFFER_MS": 0, + "NO_COMMAND_LOG": 1 + } + }, +}) \ No newline at end of file diff --git a/cypress/plugins/index.js b/cypress/plugins/index.js index dabf6fdf0..f4cfc3bba 100644 --- a/cypress/plugins/index.js +++ b/cypress/plugins/index.js @@ -24,25 +24,22 @@ module.exports = (on, config) => { // `on` is used to hook into various events Cypress emits // `config` is the resolved Cypress config - /** * For cypress on 9.6.0 and chrome larger than 117, --headless=new is needed. * https://github.com/cypress-io/cypress-documentation/issues/5479#issuecomment-1719336938 */ - on('before:browser:launch', (browser = {}, launchOptions) => { - if ( - (browser.name === 'chrome' || browser.name === 'chromium') && - browser.isHeadless - ) { - launchOptions.args = launchOptions.args.map((arg) => { - if (arg === '--headless') { - return '--headless=new'; - } - - return arg; - }); - } - - return launchOptions; - }); + // on('before:browser:launch', (browser = {}, launchOptions) => { + // if ( + // (browser.name === 'chrome' || browser.name === 'chromium') && + // browser.isHeadless + // ) { + // launchOptions.args = launchOptions.args.map((arg) => { + // if (arg === '--headless') { + // return '--headless=new'; + // } + // return arg; + // }); + // } + // return launchOptions; + // }); }; diff --git a/package.json b/package.json index 19b3ea8e9..46d7ce5a0 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "devDependencies": { "@faker-js/faker": "^7.6.0", "commander": "^9.4.1", - "cypress": "9.5.4", + "cypress": "12.15.0", "cypress-multi-reporters": "^1.5.0", "cypress-real-events": "1.7.6", "eslint": "^7.0.0",