mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Update dependency cypress to v10 (main) (#133168)
This commit is contained in:
parent
f079550bfd
commit
b0cec96d38
201 changed files with 511 additions and 815 deletions
38
.github/CODEOWNERS
vendored
38
.github/CODEOWNERS
vendored
|
@ -383,10 +383,10 @@ x-pack/examples/files_example @elastic/kibana-app-services
|
|||
/x-pack/plugins/security_solution/common/search_strategy/timeline @elastic/security-threat-hunting-investigations
|
||||
/x-pack/plugins/security_solution/common/types/timeline @elastic/security-threat-hunting-investigations
|
||||
|
||||
/x-pack/plugins/security_solution/cypress/integration/timeline_templates @elastic/security-threat-hunting-investigations
|
||||
/x-pack/plugins/security_solution/cypress/integration/timeline @elastic/security-threat-hunting-investigations
|
||||
/x-pack/plugins/security_solution/cypress/integration/detection_alerts @elastic/security-threat-hunting-investigations
|
||||
/x-pack/plugins/security_solution/cypress/integration/urls @elastic/security-threat-hunting-investigations
|
||||
/x-pack/plugins/security_solution/cypress/e2e/timeline_templates @elastic/security-threat-hunting-investigations
|
||||
/x-pack/plugins/security_solution/cypress/e2e/timeline @elastic/security-threat-hunting-investigations
|
||||
/x-pack/plugins/security_solution/cypress/e2e/detection_alerts @elastic/security-threat-hunting-investigations
|
||||
/x-pack/plugins/security_solution/cypress/e2e/urls @elastic/security-threat-hunting-investigations
|
||||
|
||||
/x-pack/plugins/security_solution/public/common/components/alerts_viewer @elastic/security-threat-hunting-investigations
|
||||
/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_action @elastic/security-threat-hunting-investigations
|
||||
|
@ -407,18 +407,18 @@ x-pack/examples/files_example @elastic/kibana-app-services
|
|||
/x-pack/plugins/security_solution/common/search_strategy/security_solution/network @elastic/security-threat-hunting-explore
|
||||
/x-pack/plugins/security_solution/common/search_strategy/security_solution/user @elastic/security-threat-hunting-explore
|
||||
|
||||
/x-pack/plugins/security_solution/cypress/integration/cases @elastic/security-threat-hunting-explore
|
||||
/x-pack/plugins/security_solution/cypress/integration/host_details @elastic/security-threat-hunting-explore
|
||||
/x-pack/plugins/security_solution/cypress/integration/hosts @elastic/security-threat-hunting-explore
|
||||
/x-pack/plugins/security_solution/cypress/integration/network @elastic/security-threat-hunting-explore
|
||||
/x-pack/plugins/security_solution/cypress/integration/overview @elastic/security-threat-hunting-explore
|
||||
/x-pack/plugins/security_solution/cypress/integration/pagination @elastic/security-threat-hunting-explore
|
||||
/x-pack/plugins/security_solution/cypress/integration/users @elastic/security-threat-hunting-explore
|
||||
/x-pack/plugins/security_solution/cypress/e2e/cases @elastic/security-threat-hunting-explore
|
||||
/x-pack/plugins/security_solution/cypress/e2e/host_details @elastic/security-threat-hunting-explore
|
||||
/x-pack/plugins/security_solution/cypress/e2e/hosts @elastic/security-threat-hunting-explore
|
||||
/x-pack/plugins/security_solution/cypress/e2e/network @elastic/security-threat-hunting-explore
|
||||
/x-pack/plugins/security_solution/cypress/e2e/overview @elastic/security-threat-hunting-explore
|
||||
/x-pack/plugins/security_solution/cypress/e2e/pagination @elastic/security-threat-hunting-explore
|
||||
/x-pack/plugins/security_solution/cypress/e2e/users @elastic/security-threat-hunting-explore
|
||||
/x-pack/plugins/security_solution/cypress/screens/hosts @elastic/security-threat-hunting-explore
|
||||
/x-pack/plugins/security_solution/cypress/screens/network @elastic/security-threat-hunting-explore
|
||||
/x-pack/plugins/security_solution/cypress/tasks/hosts @elastic/security-threat-hunting-explore
|
||||
/x-pack/plugins/security_solution/cypress/tasks/network @elastic/security-threat-hunting-explore
|
||||
/x-pack/plugins/security_solution/cypress/upgrade_integration/threat_hunting/cases @elastic/security-threat-hunting-explore
|
||||
/x-pack/plugins/security_solution/cypress/upgrade_e2e/threat_hunting/cases @elastic/security-threat-hunting-explore
|
||||
|
||||
/x-pack/plugins/security_solution/public/common/components/charts @elastic/security-threat-hunting-explore
|
||||
/x-pack/plugins/security_solution/public/common/components/header_page @elastic/security-threat-hunting-explore
|
||||
|
@ -463,7 +463,7 @@ x-pack/examples/files_example @elastic/kibana-app-services
|
|||
|
||||
|
||||
## Security Solution sub teams - Detections and Response Rules
|
||||
/x-pack/plugins/security_solution/cypress/integration/detection_rules @elastic/security-detections-response-rules
|
||||
/x-pack/plugins/security_solution/cypress/e2e/detection_rules @elastic/security-detections-response-rules
|
||||
|
||||
/x-pack/plugins/security_solution/public/detections/components/rules @elastic/security-detections-response-rules
|
||||
/x-pack/plugins/security_solution/public/detections/components/severity @elastic/security-detections-response-rules
|
||||
|
@ -488,9 +488,9 @@ x-pack/examples/files_example @elastic/kibana-app-services
|
|||
## Security Solution sub teams - Security Platform
|
||||
/x-pack/plugins/lists @elastic/security-solution-platform
|
||||
|
||||
/x-pack/plugins/security_solution/cypress/integration/data_sources @elastic/security-solution-platform
|
||||
/x-pack/plugins/security_solution/cypress/integration/exceptions @elastic/security-solution-platform
|
||||
/x-pack/plugins/security_solution/cypress/integration/value_lists @elastic/security-solution-platform
|
||||
/x-pack/plugins/security_solution/cypress/e2e/data_sources @elastic/security-solution-platform
|
||||
/x-pack/plugins/security_solution/cypress/e2e/exceptions @elastic/security-solution-platform
|
||||
/x-pack/plugins/security_solution/cypress/e2e/value_lists @elastic/security-solution-platform
|
||||
|
||||
/x-pack/plugins/security_solution/public/common/components/exceptions @elastic/security-solution-platform
|
||||
/x-pack/plugins/security_solution/public/exceptions @elastic/security-solution-platform
|
||||
|
@ -540,8 +540,8 @@ x-pack/plugins/security_solution/server/usage/ @elastic/security-data-analytics
|
|||
x-pack/plugins/security_solution/server/lib/telemetry/ @elastic/security-data-analytics
|
||||
|
||||
## Security Solution sub teams - security-engineering-productivity
|
||||
x-pack/plugins/security_solution/cypress/ccs_integration @elastic/security-engineering-productivity
|
||||
x-pack/plugins/security_solution/cypress/upgrade_integration @elastic/security-engineering-productivity
|
||||
x-pack/plugins/security_solution/cypress/ccs_e2e @elastic/security-engineering-productivity
|
||||
x-pack/plugins/security_solution/cypress/upgrade_e2e @elastic/security-engineering-productivity
|
||||
x-pack/plugins/security_solution/cypress/README.md @elastic/security-engineering-productivity
|
||||
x-pack/test/security_solution_cypress @elastic/security-engineering-productivity
|
||||
|
||||
|
@ -571,7 +571,7 @@ x-pack/test/threat_intelligence_cypress @elastic/protections-experience
|
|||
|
||||
# Security Solution onboarding tour
|
||||
/x-pack/plugins/security_solution/public/common/components/guided_onboarding @elastic/platform-onboarding
|
||||
/x-pack/plugins/security_solution/cypress/integration/guided_onboarding @elastic/platform-onboarding
|
||||
/x-pack/plugins/security_solution/cypress/e2e/guided_onboarding @elastic/platform-onboarding
|
||||
|
||||
# Design (at the bottom for specificity of SASS files)
|
||||
**/*.scss @elastic/kibana-design
|
||||
|
|
16
package.json
16
package.json
|
@ -650,9 +650,9 @@
|
|||
"@babel/types": "^7.19.0",
|
||||
"@bazel/ibazel": "^0.16.2",
|
||||
"@bazel/typescript": "4.6.2",
|
||||
"@cypress/code-coverage": "^3.9.12",
|
||||
"@cypress/code-coverage": "^3.10.0",
|
||||
"@cypress/snapshot": "^2.1.7",
|
||||
"@cypress/webpack-preprocessor": "^5.6.0",
|
||||
"@cypress/webpack-preprocessor": "^5.12.2",
|
||||
"@elastic/eslint-plugin-eui": "0.0.2",
|
||||
"@elastic/github-checks-reporter": "0.0.20b3",
|
||||
"@elastic/makelogs": "^6.0.0",
|
||||
|
@ -1228,14 +1228,14 @@
|
|||
"cssnano": "^5.1.12",
|
||||
"cssnano-preset-default": "^5.2.12",
|
||||
"csstype": "^3.0.2",
|
||||
"cypress": "^9.6.1",
|
||||
"cypress-axe": "^0.14.0",
|
||||
"cypress": "^10.7.0",
|
||||
"cypress-axe": "^1.0.0",
|
||||
"cypress-file-upload": "^5.0.8",
|
||||
"cypress-multi-reporters": "^1.6.0",
|
||||
"cypress-multi-reporters": "^1.6.1",
|
||||
"cypress-pipe": "^2.0.0",
|
||||
"cypress-react-selector": "^2.3.17",
|
||||
"cypress-real-events": "^1.7.0",
|
||||
"cypress-recurse": "^1.20.0",
|
||||
"cypress-react-selector": "^3.0.0",
|
||||
"cypress-real-events": "^1.7.1",
|
||||
"cypress-recurse": "^1.23.0",
|
||||
"debug": "^2.6.9",
|
||||
"delete-empty": "^2.0.0",
|
||||
"dependency-check": "^4.1.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuites name="Mocha Tests" time="16.198" tests="2" failures="1">
|
||||
<testsuite name="Root Suite" timestamp="2020-07-22T15:06:26" tests="0" file="cypress/integration/timeline_flyout_button.spec.ts" failures="0" time="0">
|
||||
<testsuite name="Root Suite" timestamp="2020-07-22T15:06:26" tests="0" file="cypress/e2e/timeline_flyout_button.spec.ts" failures="0" time="0">
|
||||
</testsuite>
|
||||
<testsuite name="timeline flyout button" timestamp="2020-07-22T15:06:26" tests="2" failures="1" time="16.198">
|
||||
<testcase name="timeline flyout button toggles open the timeline" time="8.099" classname="toggles open the timeline">
|
||||
|
|
|
@ -282,9 +282,9 @@ it('rewrites cypress reports with minimal changes', async () => {
|
|||
-‹?xml version="1.0" encoding="UTF-8"?›
|
||||
+‹?xml version="1.0" encoding="utf-8"?›
|
||||
‹testsuites name="Mocha Tests" time="16.198" tests="2" failures="1"›
|
||||
- ‹testsuite name="Root Suite" timestamp="2020-07-22T15:06:26" tests="0" file="cypress/integration/timeline_flyout_button.spec.ts" failures="0" time="0"›
|
||||
- ‹testsuite name="Root Suite" timestamp="2020-07-22T15:06:26" tests="0" file="cypress/e2e/timeline_flyout_button.spec.ts" failures="0" time="0"›
|
||||
- ‹/testsuite›
|
||||
+ ‹testsuite name="Root Suite" timestamp="2020-07-22T15:06:26" tests="0" file="cypress/integration/timeline_flyout_button.spec.ts" failures="0" time="0"/›
|
||||
+ ‹testsuite name="Root Suite" timestamp="2020-07-22T15:06:26" tests="0" file="cypress/e2e/timeline_flyout_button.spec.ts" failures="0" time="0"/›
|
||||
‹testsuite name="timeline flyout button" timestamp="2020-07-22T15:06:26" tests="2" failures="1" time="16.198"›
|
||||
- ‹testcase name="timeline flyout button toggles open the timeline" time="8.099" classname="toggles open the timeline"›
|
||||
- ‹/testcase›
|
||||
|
|
36
x-pack/plugins/apm/ftr_e2e/cypress.config.ts
Normal file
36
x-pack/plugins/apm/ftr_e2e/cypress.config.ts
Normal file
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { defineConfig } from 'cypress';
|
||||
import { plugin } from './cypress/plugins';
|
||||
|
||||
module.exports = defineConfig({
|
||||
fileServerFolder: './cypress',
|
||||
fixturesFolder: './cypress/fixtures',
|
||||
screenshotsFolder: './cypress/screenshots',
|
||||
videosFolder: './cypress/videos',
|
||||
requestTimeout: 10000,
|
||||
responseTimeout: 40000,
|
||||
defaultCommandTimeout: 30000,
|
||||
execTimeout: 120000,
|
||||
pageLoadTimeout: 120000,
|
||||
viewportHeight: 900,
|
||||
viewportWidth: 1440,
|
||||
video: false,
|
||||
screenshotOnRunFailure: false,
|
||||
e2e: {
|
||||
// We've imported your old cypress plugins here.
|
||||
// You may want to clean this up later by importing these.
|
||||
setupNodeEvents(on, config) {
|
||||
plugin(on, config);
|
||||
},
|
||||
baseUrl: 'http://localhost:5601',
|
||||
supportFile: './cypress/support/e2e.ts',
|
||||
specPattern: './cypress/e2e/**/*.cy.{js,jsx,ts,tsx}',
|
||||
experimentalSessionAndOrigin: false,
|
||||
},
|
||||
});
|
|
@ -1,19 +0,0 @@
|
|||
{
|
||||
"fileServerFolder": "./cypress",
|
||||
"fixturesFolder": "./cypress/fixtures",
|
||||
"integrationFolder": "./cypress/integration",
|
||||
"pluginsFile": "./cypress/plugins/index.ts",
|
||||
"screenshotsFolder": "./cypress/screenshots",
|
||||
"supportFile": "./cypress/support/index.ts",
|
||||
"videosFolder": "./cypress/videos",
|
||||
"requestTimeout": 10000,
|
||||
"responseTimeout": 40000,
|
||||
"defaultCommandTimeout": 30000,
|
||||
"execTimeout": 120000,
|
||||
"pageLoadTimeout": 120000,
|
||||
"viewportHeight": 900,
|
||||
"viewportWidth": 1440,
|
||||
"video": false,
|
||||
"screenshotOnRunFailure": false,
|
||||
"experimentalSessionAndOrigin": true
|
||||
}
|
|
@ -31,6 +31,10 @@ describe('Home page', () => {
|
|||
to: new Date(end).getTime(),
|
||||
})
|
||||
);
|
||||
|
||||
cy.updateAdvancedSettings({
|
||||
'observability:enableComparisonByDefault': true,
|
||||
});
|
||||
});
|
||||
|
||||
after(() => {
|
|
@ -29,7 +29,7 @@ import { createEsClientForTesting } from '@kbn/test';
|
|||
* @type {Cypress.PluginConfig}
|
||||
*/
|
||||
|
||||
const plugin: Cypress.PluginConfig = (on, config) => {
|
||||
export const plugin: Cypress.PluginConfig = (on, config) => {
|
||||
// `on` is used to hook into various events Cypress emits
|
||||
// `config` is the resolved Cypress config
|
||||
|
||||
|
@ -66,5 +66,3 @@ const plugin: Cypress.PluginConfig = (on, config) => {
|
|||
},
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = plugin;
|
||||
|
|
|
@ -21,25 +21,26 @@ Cypress.Commands.add('loginAsEditorUser', () => {
|
|||
Cypress.Commands.add(
|
||||
'loginAs',
|
||||
({ username, password }: { username: string; password: string }) => {
|
||||
cy.log(`Calling 'loginAs'`);
|
||||
cy.session([username, password], () => {
|
||||
cy.log(`Logging in as ${username}`);
|
||||
const kibanaUrl = Cypress.env('KIBANA_URL');
|
||||
cy.request({
|
||||
log: false,
|
||||
method: 'POST',
|
||||
url: `${kibanaUrl}/internal/security/login`,
|
||||
body: {
|
||||
providerType: 'basic',
|
||||
providerName: 'basic',
|
||||
currentURL: `${kibanaUrl}/login`,
|
||||
params: { username, password },
|
||||
},
|
||||
headers: {
|
||||
'kbn-xsrf': 'e2e_test',
|
||||
},
|
||||
});
|
||||
// cy.session(username, () => {
|
||||
const kibanaUrl = Cypress.env('KIBANA_URL');
|
||||
cy.log(`Logging in as ${username} on ${kibanaUrl}`);
|
||||
cy.visit('/');
|
||||
cy.request({
|
||||
log: true,
|
||||
method: 'POST',
|
||||
url: `${kibanaUrl}/internal/security/login`,
|
||||
body: {
|
||||
providerType: 'basic',
|
||||
providerName: 'basic',
|
||||
currentURL: `${kibanaUrl}/login`,
|
||||
params: { username, password },
|
||||
},
|
||||
headers: {
|
||||
'kbn-xsrf': 'e2e_test',
|
||||
},
|
||||
// });
|
||||
});
|
||||
cy.visit('/');
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
@ -5,5 +5,9 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
Cypress.on('uncaught:exception', (err, runnable) => {
|
||||
return false;
|
||||
});
|
||||
|
||||
import './commands';
|
||||
// import './output_command_timings';
|
|
@ -58,10 +58,9 @@ export async function cypressTestRunner({ getService }: FtrProviderContext) {
|
|||
...cypressCliArgs,
|
||||
project: cypressProjectPath,
|
||||
config: {
|
||||
baseUrl: kibanaUrl,
|
||||
requestTimeout: 10000,
|
||||
responseTimeout: 60000,
|
||||
defaultCommandTimeout: 15000,
|
||||
e2e: {
|
||||
baseUrl: kibanaUrl,
|
||||
},
|
||||
},
|
||||
env: {
|
||||
KIBANA_URL: kibanaUrl,
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { defineConfig } from 'cypress';
|
||||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
export default defineConfig({
|
||||
defaultCommandTimeout: 120000,
|
||||
e2e: {
|
||||
baseUrl: 'http://localhost:5601',
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
setupNodeEvents(on, config) {},
|
||||
supportFile: './cypress/support/commands.ts',
|
||||
},
|
||||
env: {
|
||||
password: 'changeme',
|
||||
username: 'elastic',
|
||||
},
|
||||
execTimeout: 120000,
|
||||
pageLoadTimeout: 180000,
|
||||
retries: {
|
||||
runMode: 2,
|
||||
},
|
||||
screenshotsFolder: '../../../target/cypress/screenshots',
|
||||
video: false,
|
||||
videosFolder: '../../../target/cypress/videos',
|
||||
viewportHeight: 1200,
|
||||
viewportWidth: 1600,
|
||||
});
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"supportFile": "./cypress/support/commands.ts",
|
||||
"pluginsFile": false,
|
||||
"retries": {
|
||||
"runMode": 2
|
||||
},
|
||||
"baseUrl": "http://localhost:5601",
|
||||
"env": {
|
||||
"username": "elastic",
|
||||
"password": "changeme"
|
||||
},
|
||||
"screenshotsFolder": "../../../target/cypress/screenshots",
|
||||
"videosFolder": "../../../target/cypress/videos",
|
||||
"defaultCommandTimeout": 120000,
|
||||
"execTimeout": 120000,
|
||||
"pageLoadTimeout": 180000,
|
||||
"viewportWidth": 1600,
|
||||
"viewportHeight": 1200,
|
||||
"video": false
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { defineConfig } from 'cypress';
|
||||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
export default defineConfig({
|
||||
defaultCommandTimeout: 120000,
|
||||
e2e: {
|
||||
baseUrl: 'http://localhost:5601',
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
setupNodeEvents(on, config) {},
|
||||
supportFile: false,
|
||||
},
|
||||
env: {
|
||||
password: 'changeme',
|
||||
username: 'elastic',
|
||||
},
|
||||
execTimeout: 120000,
|
||||
fixturesFolder: false,
|
||||
pageLoadTimeout: 180000,
|
||||
retries: {
|
||||
runMode: 2,
|
||||
},
|
||||
screenshotsFolder: '../../../target/cypress/screenshots',
|
||||
video: false,
|
||||
videosFolder: '../../../target/cypress/videos',
|
||||
viewportHeight: 1200,
|
||||
viewportWidth: 1600,
|
||||
});
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"supportFile": false,
|
||||
"pluginsFile": false,
|
||||
"retries": {
|
||||
"runMode": 2
|
||||
},
|
||||
"baseUrl": "http://localhost:5601",
|
||||
"env": {
|
||||
"username": "elastic",
|
||||
"password": "changeme"
|
||||
},
|
||||
"fixturesFolder": false,
|
||||
"screenshotsFolder": "../../../target/cypress/screenshots",
|
||||
"videosFolder": "../../../target/cypress/videos",
|
||||
"defaultCommandTimeout": 120000,
|
||||
"execTimeout": 120000,
|
||||
"pageLoadTimeout": 180000,
|
||||
"viewportWidth": 1600,
|
||||
"viewportHeight": 1200,
|
||||
"video": false
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { defineConfig } from 'cypress';
|
||||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
export default defineConfig({
|
||||
defaultCommandTimeout: 120000,
|
||||
e2e: {
|
||||
baseUrl: 'http://localhost:5601',
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
setupNodeEvents(on, config) {},
|
||||
supportFile: './cypress/support/commands.ts',
|
||||
},
|
||||
env: {
|
||||
password: 'changeme',
|
||||
username: 'elastic',
|
||||
},
|
||||
execTimeout: 120000,
|
||||
pageLoadTimeout: 180000,
|
||||
retries: {
|
||||
runMode: 2,
|
||||
},
|
||||
screenshotsFolder: '../../../target/cypress/screenshots',
|
||||
video: false,
|
||||
videosFolder: '../../../target/cypress/videos',
|
||||
viewportHeight: 1200,
|
||||
viewportWidth: 1600,
|
||||
});
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"supportFile": "./cypress/support/commands.ts",
|
||||
"pluginsFile": false,
|
||||
"retries": {
|
||||
"runMode": 2
|
||||
},
|
||||
"baseUrl": "http://localhost:5601",
|
||||
"env": {
|
||||
"username": "elastic",
|
||||
"password": "changeme"
|
||||
},
|
||||
"screenshotsFolder": "../../../target/cypress/screenshots",
|
||||
"videosFolder": "../../../target/cypress/videos",
|
||||
"defaultCommandTimeout": 120000,
|
||||
"execTimeout": 120000,
|
||||
"pageLoadTimeout": 180000,
|
||||
"viewportWidth": 1600,
|
||||
"viewportHeight": 1200,
|
||||
"video": false
|
||||
}
|
44
x-pack/plugins/fleet/cypress.config.ts
Normal file
44
x-pack/plugins/fleet/cypress.config.ts
Normal file
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { defineConfig } from 'cypress';
|
||||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
export default defineConfig({
|
||||
defaultCommandTimeout: 60000,
|
||||
requestTimeout: 60000,
|
||||
responseTimeout: 60000,
|
||||
execTimeout: 120000,
|
||||
pageLoadTimeout: 120000,
|
||||
|
||||
retries: {
|
||||
runMode: 2,
|
||||
},
|
||||
|
||||
screenshotsFolder: '../../../target/kibana-fleet/cypress/screenshots',
|
||||
trashAssetsBeforeRuns: false,
|
||||
video: false,
|
||||
videosFolder: '../../../target/kibana-fleet/cypress/videos',
|
||||
viewportHeight: 900,
|
||||
viewportWidth: 1440,
|
||||
screenshotOnRunFailure: true,
|
||||
|
||||
env: {
|
||||
protocol: 'http',
|
||||
hostname: 'localhost',
|
||||
configport: '5601',
|
||||
},
|
||||
|
||||
e2e: {
|
||||
baseUrl: 'http://localhost:5601',
|
||||
setupNodeEvents(on, config) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires, @kbn/imports/no_boundary_crossing
|
||||
return require('./cypress/plugins')(on, config);
|
||||
},
|
||||
},
|
||||
});
|
|
@ -1,24 +0,0 @@
|
|||
{
|
||||
"baseUrl": "http://localhost:5620",
|
||||
"defaultCommandTimeout": 60000,
|
||||
"requestTimeout": 60000,
|
||||
"responseTimeout": 60000,
|
||||
"execTimeout": 120000,
|
||||
"pageLoadTimeout": 120000,
|
||||
"nodeVersion": "system",
|
||||
"retries": {
|
||||
"runMode": 2
|
||||
},
|
||||
"screenshotsFolder": "../../../target/kibana-fleet/cypress/screenshots",
|
||||
"trashAssetsBeforeRuns": false,
|
||||
"video": false,
|
||||
"videosFolder": "../../../target/kibana-fleet/cypress/videos",
|
||||
"viewportHeight": 900,
|
||||
"viewportWidth": 1440,
|
||||
"screenshotOnRunFailure": true,
|
||||
"env": {
|
||||
"protocol": "http",
|
||||
"hostname": "localhost",
|
||||
"configport": "5601"
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -4,7 +4,7 @@
|
|||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
/* eslint-disable-next-line import/no-extraneous-dependencies */
|
||||
|
||||
import 'cypress-real-events/support';
|
||||
import { checkA11y } from '../../support/commands';
|
||||
import { FLEET, navigateTo } from '../../tasks/navigation';
|
|
@ -1,7 +1,8 @@
|
|||
{
|
||||
"extends": "../../../../tsconfig.base.json",
|
||||
"include": [
|
||||
"**/*"
|
||||
"**/*",
|
||||
"../cypress.config.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"target/**/*"
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
"license": "Elastic-License",
|
||||
"scripts": {
|
||||
"cypress": "../../../node_modules/.bin/cypress",
|
||||
"cypress:open": "yarn cypress open --config-file ./cypress/cypress.json",
|
||||
"cypress:open": "yarn cypress open --config-file ./cypress.config.ts",
|
||||
"cypress:open-as-ci": "node ../../../scripts/functional_tests --config ../../test/fleet_cypress/visual_config.ts",
|
||||
"cypress:run": "yarn cypress:run:reporter --browser chrome --spec './cypress/integration/**/*.spec.ts'; status=$?; yarn junit:merge && exit $status",
|
||||
"cypress:run": "yarn cypress:run:reporter --browser chrome --spec './cypress/e2e/**/*.cy.ts'; status=$?; yarn junit:merge && exit $status",
|
||||
"cypress:run-as-ci": "node ../../../scripts/functional_tests --config ../../test/fleet_cypress/cli_config.ts",
|
||||
"cypress:run:reporter": "yarn cypress run --config-file ./cypress/cypress.json --reporter ../../../node_modules/cypress-multi-reporters --reporter-options configFile=./cypress/reporter_config.json",
|
||||
"cypress:run:reporter": "yarn cypress run --config-file ./cypress.config.ts --reporter ../../../node_modules/cypress-multi-reporters --reporter-options configFile=./cypress/reporter_config.json",
|
||||
"junit:merge": "../../../node_modules/.bin/mochawesome-merge ../../../target/kibana-fleet/cypress/results/mochawesome*.json > ../../../target/kibana-fleet/cypress/results/output.json && ../../../node_modules/.bin/marge ../../../target/kibana-fleet/cypress/results/output.json --reportDir ../../../target/kibana-fleet/cypress/results && mkdir -p ../../../target/junit && cp ../../../target/kibana-fleet/cypress/results/*.xml ../../../target/junit/"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,8 +6,9 @@
|
|||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
},
|
||||
"exclude": ["cypress.config.ts"],
|
||||
"include": [
|
||||
// add all the folders containg files to be compiled
|
||||
// add all the folders containing files to be compiled
|
||||
".storybook/**/*",
|
||||
"common/**/*",
|
||||
"public/**/*",
|
||||
|
@ -15,6 +16,7 @@
|
|||
"server/**/*.json",
|
||||
"scripts/**/*",
|
||||
"package.json",
|
||||
"cypress.config.ts",
|
||||
"../../../typings/**/*"
|
||||
],
|
||||
"references": [
|
||||
|
|
42
x-pack/plugins/osquery/cypress.config.ts
Normal file
42
x-pack/plugins/osquery/cypress.config.ts
Normal file
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { defineConfig } from 'cypress';
|
||||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
export default defineConfig({
|
||||
defaultCommandTimeout: 60000,
|
||||
execTimeout: 120000,
|
||||
pageLoadTimeout: 12000,
|
||||
|
||||
retries: {
|
||||
runMode: 1,
|
||||
openMode: 0,
|
||||
},
|
||||
|
||||
screenshotsFolder: '../../../target/kibana-osquery/cypress/screenshots',
|
||||
trashAssetsBeforeRuns: false,
|
||||
video: false,
|
||||
videosFolder: '../../../target/kibana-osquery/cypress/videos',
|
||||
viewportHeight: 900,
|
||||
viewportWidth: 1440,
|
||||
experimentalStudio: true,
|
||||
|
||||
env: {
|
||||
'cypress-react-selector': {
|
||||
root: '#osquery-app',
|
||||
},
|
||||
},
|
||||
|
||||
e2e: {
|
||||
baseUrl: 'http://localhost:5601',
|
||||
setupNodeEvents(on, config) {
|
||||
// implement node event listeners here
|
||||
},
|
||||
},
|
||||
});
|
|
@ -1,22 +0,0 @@
|
|||
{
|
||||
"baseUrl": "http://localhost:5620",
|
||||
"defaultCommandTimeout": 60000,
|
||||
"execTimeout": 120000,
|
||||
"pageLoadTimeout": 12000,
|
||||
"retries": {
|
||||
"runMode": 1,
|
||||
"openMode": 0
|
||||
},
|
||||
"screenshotsFolder": "../../../target/kibana-osquery/cypress/screenshots",
|
||||
"trashAssetsBeforeRuns": false,
|
||||
"video": false,
|
||||
"videosFolder": "../../../target/kibana-osquery/cypress/videos",
|
||||
"viewportHeight": 900,
|
||||
"viewportWidth": 1440,
|
||||
"experimentalStudio": true,
|
||||
"env": {
|
||||
"cypress-react-selector": {
|
||||
"root": "#osquery-app"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -47,7 +47,8 @@ const logMessage = (s: string) => {
|
|||
* If there are more files loaded from support folder, also removes them
|
||||
*/
|
||||
const filterSupportFilesFromCoverage = (totalCoverage: any) => {
|
||||
const integrationFolder = Cypress.config('integrationFolder');
|
||||
// @ts-expect-error update types
|
||||
const integrationFolder = Cypress.config('e2eFolder');
|
||||
const supportFile = Cypress.config('supportFile');
|
||||
|
||||
/** @type {string} Cypress run-time config has the support folder string */
|
||||
|
@ -64,6 +65,7 @@ const filterSupportFilesFromCoverage = (totalCoverage: any) => {
|
|||
// if we have files from support folder AND the support folder is not same
|
||||
// as the integration, or its prefix (this might remove all app source files)
|
||||
// then remove all files from the support folder
|
||||
// @ts-expect-error update types
|
||||
if (!integrationFolder.startsWith(supportFolder)) {
|
||||
// remove all covered files from support folder
|
||||
coverage = Cypress._.omitBy(totalCoverage, (fileCoverage, filename) =>
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{
|
||||
"extends": "../../../../tsconfig.base.json",
|
||||
"include": [
|
||||
"**/*"
|
||||
"**/*",
|
||||
"../cypress.config.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"target/**/*"
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
"private": true,
|
||||
"license": "Elastic-License",
|
||||
"scripts": {
|
||||
"cypress:open": "../../../node_modules/.bin/cypress open --config-file ./cypress/cypress.json",
|
||||
"cypress:open": "../../../node_modules/.bin/cypress open --config-file ./cypress.config.ts",
|
||||
"cypress:open-as-ci": "node ../../../scripts/functional_tests --config ../../test/osquery_cypress/visual_config.ts",
|
||||
"cypress:run": "../../../node_modules/.bin/cypress run --config-file ./cypress/cypress.json",
|
||||
"cypress:run": "../../../node_modules/.bin/cypress run --config-file ./cypress.config.ts",
|
||||
"cypress:run-as-ci": "node ../../../scripts/functional_tests --config ../../test/osquery_cypress/cli_config.ts",
|
||||
"nyc": "../../../node_modules/.bin/nyc report --reporter=text-summary"
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
"declaration": true,
|
||||
"declarationMap": true
|
||||
},
|
||||
"exclude": ["cypress.config.ts"],
|
||||
"include": [
|
||||
// add all the folders contains files to be compiled
|
||||
"common/**/*",
|
||||
|
@ -13,6 +14,7 @@
|
|||
"scripts/**/*",
|
||||
"scripts/**/**.json",
|
||||
"server/**/*",
|
||||
"cypress.config.ts",
|
||||
"../../../typings/**/*",
|
||||
// ECS and Osquery schema files
|
||||
"public/common/schemas/*/**.json",
|
||||
|
|
|
@ -83,7 +83,7 @@ This configuration runs cypress tests against an arbitrary host.
|
|||
|
||||
#### integration-test (CI)
|
||||
|
||||
This configuration is driven by [elastic/integration-test](https://github.com/elastic/integration-test) which, as part of a bigger set of tests, provisions one VM with two instances configured in CCS mode and runs the [CCS Cypress test specs](./ccs_integration).
|
||||
This configuration is driven by [elastic/integration-test](https://github.com/elastic/integration-test) which, as part of a bigger set of tests, provisions one VM with two instances configured in CCS mode and runs the [CCS Cypress test specs](./ccs_e2e).
|
||||
|
||||
The two clusters are named `admin` and `data` and are reachable as follows:
|
||||
|
||||
|
@ -280,13 +280,13 @@ If you are debugging a flaky test, a good tip is to insert a `cy.wait(<some long
|
|||
|
||||
Below you can find the folder structure used on our Cypress tests.
|
||||
|
||||
### ccs_integration/
|
||||
### ccs_e2e/
|
||||
|
||||
Contains the specs that are executed in a Cross Cluster Search configuration.
|
||||
|
||||
### integration/
|
||||
### e2e/
|
||||
|
||||
Cypress convention. Contains the specs that are going to be executed.
|
||||
Cypress convention starting version 10 (previously known as integration). Contains the specs that are going to be executed.
|
||||
|
||||
### fixtures/
|
||||
|
||||
|
|
30
x-pack/plugins/security_solution/cypress/cypress.config.ts
Normal file
30
x-pack/plugins/security_solution/cypress/cypress.config.ts
Normal file
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { defineConfig } from 'cypress';
|
||||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
export default defineConfig({
|
||||
defaultCommandTimeout: 20000,
|
||||
execTimeout: 20000,
|
||||
pageLoadTimeout: 20000,
|
||||
screenshotsFolder: '../../../target/kibana-security-solution/cypress/screenshots',
|
||||
trashAssetsBeforeRuns: false,
|
||||
video: false,
|
||||
videosFolder: '../../../target/kibana-security-solution/cypress/videos',
|
||||
viewportHeight: 946,
|
||||
viewportWidth: 1680,
|
||||
e2e: {
|
||||
baseUrl: 'http://localhost:5601',
|
||||
// We've imported your old cypress plugins here.
|
||||
// You may want to clean this up later by importing these.
|
||||
setupNodeEvents(on, config) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
return require('./plugins')(on, config);
|
||||
},
|
||||
},
|
||||
});
|
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
"defaultCommandTimeout": 20000,
|
||||
"execTimeout": 20000,
|
||||
"pageLoadTimeout": 20000,
|
||||
"nodeVersion": "system",
|
||||
"screenshotsFolder": "../../../target/kibana-security-solution/cypress/screenshots",
|
||||
"trashAssetsBeforeRuns": false,
|
||||
"video": false,
|
||||
"videosFolder": "../../../target/kibana-security-solution/cypress/videos",
|
||||
"viewportHeight": 946,
|
||||
"viewportWidth": 1680
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
|
||||
import { defineConfig } from 'cypress';
|
||||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
export default defineConfig({
|
||||
defaultCommandTimeout: 120000,
|
||||
execTimeout: 120000,
|
||||
pageLoadTimeout: 120000,
|
||||
numTestsKeptInMemory: 0,
|
||||
retries: {
|
||||
runMode: 2,
|
||||
},
|
||||
screenshotsFolder: '../../../target/kibana-security-solution/cypress/screenshots',
|
||||
trashAssetsBeforeRuns: false,
|
||||
video: false,
|
||||
videosFolder: '../../../target/kibana-security-solution/cypress/videos',
|
||||
viewportHeight: 946,
|
||||
viewportWidth: 1680,
|
||||
e2e: {
|
||||
baseUrl: 'http://localhost:5601',
|
||||
// We've imported your old cypress plugins here.
|
||||
// You may want to clean this up later by importing these.
|
||||
setupNodeEvents(on, config) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
return require('./plugins')(on, config);
|
||||
},
|
||||
},
|
||||
});
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
"defaultCommandTimeout": 120000,
|
||||
"execTimeout": 120000,
|
||||
"pageLoadTimeout": 120000,
|
||||
"nodeVersion": "system",
|
||||
"numTestsKeptInMemory": 0,
|
||||
"retries": {
|
||||
"runMode": 2
|
||||
},
|
||||
"screenshotsFolder": "../../../target/kibana-security-solution/cypress/screenshots",
|
||||
"trashAssetsBeforeRuns": false,
|
||||
"video": false,
|
||||
"videosFolder": "../../../target/kibana-security-solution/cypress/videos",
|
||||
"viewportHeight": 946,
|
||||
"viewportWidth": 1680
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue