mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Security Solution] Create new explore team cypress config (#158747)
## Summary [This PR copies off of this one which adds a config for Investigations, but instead adds one for Explore.](https://github.com/elastic/kibana/pull/158236) In this PR following this issue: https://github.com/elastic/kibana/issues/153661 we are creating a Cypress execution just for the `Explore` team. That would help the teams to improve their ownership of the tests. - This PR moves one Explore test to the new directory. We plan to move them all in a follow up PR. - We are updating the codeowners file to reflect this new change. - We are creating a new script that runs just the explore team. - We are doing all the necessary changes to have all the tests inside the new explore folder executed on the CI - We are adding this new execution to the unsupported ftrs execution ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
cf9f5bb807
commit
048bbb5421
35 changed files with 306 additions and 276 deletions
|
@ -35,13 +35,10 @@ disabled:
|
|||
- x-pack/test/osquery_cypress/cli_config.ts
|
||||
- x-pack/test/osquery_cypress/config.ts
|
||||
- x-pack/test/osquery_cypress/visual_config.ts
|
||||
- x-pack/test/security_solution_cypress/cases_cli_config.ts
|
||||
- x-pack/test/security_solution_cypress/ccs_config.ts
|
||||
- x-pack/test/security_solution_cypress/cli_config.ts
|
||||
- x-pack/test/security_solution_cypress/cli_config_investigations_parallel.ts
|
||||
- x-pack/test/security_solution_cypress/config.firefox.ts
|
||||
- x-pack/test/security_solution_cypress/config.ts
|
||||
- x-pack/test/security_solution_cypress/response_ops_cli_config.ts
|
||||
- x-pack/test/security_solution_cypress/upgrade_config.ts
|
||||
- x-pack/test/threat_intelligence_cypress/cli_config_parallel.ts
|
||||
- x-pack/test/threat_intelligence_cypress/config.ts
|
||||
|
|
|
@ -8,6 +8,10 @@
|
|||
"key": "cypress/security_solution",
|
||||
"name": "Security Solution - Cypress"
|
||||
},
|
||||
{
|
||||
"key": "cypress/security_solution_explore",
|
||||
"name": "Security Solution Explore - Cypress"
|
||||
},
|
||||
{
|
||||
"key": "cypress/osquery_cypress",
|
||||
"name": "Osquery - Cypress"
|
||||
|
|
|
@ -77,6 +77,20 @@ steps:
|
|||
- exit_status: '*'
|
||||
limit: 1
|
||||
|
||||
- command: .buildkite/scripts/steps/functional/security_solution_explore.sh
|
||||
label: 'Explore - Security Solution Tests'
|
||||
agents:
|
||||
queue: n2-4-spot
|
||||
depends_on: build
|
||||
timeout_in_minutes: 60
|
||||
parallelism: 2
|
||||
retry:
|
||||
automatic:
|
||||
- exit_status: '-1'
|
||||
limit: 3
|
||||
- exit_status: '*'
|
||||
limit: 1
|
||||
|
||||
- command: .buildkite/scripts/steps/functional/defend_workflows.sh
|
||||
label: 'Defend Workflows Cypress Tests'
|
||||
agents:
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
steps:
|
||||
- command: .buildkite/scripts/steps/functional/security_solution_explore.sh
|
||||
label: 'Explore - Security Solution Tests'
|
||||
agents:
|
||||
queue: n2-4-spot
|
||||
depends_on: build
|
||||
timeout_in_minutes: 60
|
||||
parallelism: 2
|
||||
retry:
|
||||
automatic:
|
||||
- exit_status: '-1'
|
||||
limit: 3
|
||||
- exit_status: '*'
|
||||
limit: 1
|
|
@ -74,7 +74,8 @@ const uploadPipeline = (pipelineContent: string | object) => {
|
|||
) {
|
||||
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/security_solution.yml'));
|
||||
pipeline.push(
|
||||
getPipeline('.buildkite/pipelines/pull_request/security_solution_investigations.yml')
|
||||
getPipeline('.buildkite/pipelines/pull_request/security_solution_investigations.yml'),
|
||||
getPipeline('.buildkite/pipelines/pull_request/security_solution_explore.yml')
|
||||
);
|
||||
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/defend_workflows.yml'));
|
||||
}
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
source .buildkite/scripts/steps/functional/common.sh
|
||||
|
||||
export JOB=kibana-security-solution-chrome
|
||||
export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}
|
||||
|
||||
|
||||
Xvfb :99 -screen 0 1600x1200x24 &
|
||||
|
||||
export DISPLAY=:99
|
||||
|
||||
echo "--- Explore Cypress Tests on Security Solution"
|
||||
|
||||
yarn --cwd x-pack/plugins/security_solution cypress:explore:run
|
13
.github/CODEOWNERS
vendored
13
.github/CODEOWNERS
vendored
|
@ -1050,15 +1050,7 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib
|
|||
/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/e2e/cases @elastic/security-threat-hunting-explore
|
||||
/x-pack/plugins/security_solution/cypress/e2e/dashboards @elastic/security-threat-hunting-explore
|
||||
/x-pack/plugins/security_solution/cypress/e2e/filters @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/e2e/explore @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
|
||||
|
@ -1162,6 +1154,8 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib
|
|||
/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy @elastic/security-detection-engine
|
||||
/x-pack/plugins/security_solution/server/lib/detection_engine/rule_exceptions @elastic/security-detection-engine
|
||||
/x-pack/plugins/security_solution/server/lib/sourcerer @elastic/security-detection-engine
|
||||
/x-pack/plugins/security_solution/cypress/e2e/overview @elastic/security-detection-engine
|
||||
|
||||
|
||||
## Security Threat Intelligence - Under Security Platform
|
||||
/x-pack/plugins/security_solution/public/common/components/threat_match @elastic/security-detection-engine
|
||||
|
@ -1233,7 +1227,6 @@ x-pack/test/threat_intelligence_cypress @elastic/protections-experience
|
|||
|
||||
# Security Solution onboarding tour
|
||||
/x-pack/plugins/security_solution/public/common/components/guided_onboarding @elastic/security-threat-hunting-explore
|
||||
/x-pack/plugins/security_solution/cypress/e2e/guided_onboarding @elastic/security-threat-hunting-explore
|
||||
|
||||
# Kibana design
|
||||
# scss overrides should be below this line for specificity
|
||||
|
|
|
@ -45,10 +45,31 @@ Please, before opening a PR with the new test, please make sure that the test fa
|
|||
|
||||
## Running the tests
|
||||
|
||||
There are currently four ways to run the tests, comprised of two execution modes and two target environments, which will be detailed below.
|
||||
### Run them locally
|
||||
Run the tests with the following yarn scripts:
|
||||
|
||||
| Script Name | Description |
|
||||
| ----------- | ----------- |
|
||||
| cypress | Runs the default Cypress command |
|
||||
| cypress:open | Opens the Cypress UI with all tests in the `e2e` directory. This also runs a local kibana and ES instance. The kibana instance will reload when you make code changes. This is the recommended way to debug and develop tests. |
|
||||
| cypress:open:ccs | Opens the Cypress UI and runs all tests in the `ccs_e2e` directory |
|
||||
| cypress:open:upgrade | Opens the Cypress UI and runs all tests in the `upgrade_e2e` directory |
|
||||
| cypress:run | Runs all tests in the `e2e` directory excluding `investigations` and `explore` directories in headless mode |
|
||||
| cypress:run:cases | Runs all tests under `explore/cases` in the `e2e` directory related to the Cases area team in headless mode |
|
||||
| cypress:run:reporter | Runs all tests with the specified configuration in headless mode and produces a report using `cypress-multi-reporters` |
|
||||
| cypress:run:respops | Runs all tests related to the Response Ops area team, specifically tests in `detection_alerts`, `detection_rules`, and `exceptions` directories in headless mode |
|
||||
| cypress:run:ccs | Runs all tests in the `ccs_e2e` directory in headless mode |
|
||||
| cypress:run:upgrade | Runs all tests in the `upgrade_e2e` directory in headless mode |
|
||||
| cypress:investigations:run | Runs all tests in the `e2e/investigations` directory in headless mode |
|
||||
| cypress:explore:run | Runs all tests in the `e2e/explore` directory in headless mode |
|
||||
| junit:merge | Merges individual test reports into a single report and moves the report to the `junit` directory |
|
||||
|
||||
Please note that all the headless mode commands do not open the Cypress UI and are typically used in CI/CD environments. The scripts that open the Cypress UI are useful for development and debugging.
|
||||
|
||||
### Execution modes
|
||||
|
||||
There are currently four ways to run the tests, comprised of two execution modes and two target environments, which will be detailed below.
|
||||
|
||||
#### Interactive mode
|
||||
|
||||
When you run Cypress in interactive mode, an interactive runner is displayed that allows you to see commands as they execute while also viewing the application under test. For more information, please see [cypress documentation](https://docs.cypress.io/guides/core-concepts/test-runner.html#Overview).
|
||||
|
@ -63,7 +84,7 @@ A headless browser is a browser simulation program that does not have a user int
|
|||
|
||||
This is the configuration used by CI. It uses the FTR to spawn both a Kibana instance (http://localhost:5620) and an Elasticsearch instance (http://localhost:9220) with a preloaded minimum set of data (see preceding "Test data" section), and then executes cypress against this stack. You can find this configuration in `x-pack/test/security_solution_cypress`
|
||||
|
||||
Tests run on buildkite PR pipeline is parallelized(current value = 4 parallel jobs). It can be configured in [.buildkite/pipelines/pull_request/security_solution.yml](https://github.com/elastic/kibana/blob/main/.buildkite/pipelines/pull_request/security_solution.yml) with property `parallelism`
|
||||
Tests run on buildkite PR pipeline is parallelized. It can be configured in [.buildkite/pipelines/pull_request/security_solution.yml](https://github.com/elastic/kibana/blob/main/.buildkite/pipelines/pull_request/security_solution.yml) with property `parallelism`
|
||||
|
||||
```yml
|
||||
...
|
||||
|
@ -289,6 +310,17 @@ Contains the specs that are executed in a Cross Cluster Search configuration.
|
|||
|
||||
Cypress convention starting version 10 (previously known as integration). Contains the specs that are going to be executed.
|
||||
|
||||
### e2e/explore and e2e/investigations
|
||||
|
||||
These directories contain tests which are run in their own Buildkite pipeline.
|
||||
|
||||
If you belong to one of the teams listed in the table, please add new e2e specs to the corresponding directory.
|
||||
|
||||
| Directory | Area team |
|
||||
| -- | -- |
|
||||
| `e2e/explore` | Threat Hunting Explore |
|
||||
| `e2e/investigations | Threat Hunting Investigations |
|
||||
|
||||
### fixtures/
|
||||
|
||||
Cypress convention. Fixtures are used as external pieces of static data when we stub responses.
|
||||
|
|
|
@ -5,18 +5,18 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { getNewRule } from '../../objects/rule';
|
||||
import { ROLES } from '../../../common/test';
|
||||
import { getNewRule } from '../../../objects/rule';
|
||||
import { ROLES } from '../../../../common/test';
|
||||
|
||||
import { expandFirstAlertActions } from '../../tasks/alerts';
|
||||
import { createRule } from '../../tasks/api_calls/rules';
|
||||
import { cleanKibana } from '../../tasks/common';
|
||||
import { waitForAlertsToPopulate } from '../../tasks/create_new_rule';
|
||||
import { login, visit, waitForPageWithoutDateRange } from '../../tasks/login';
|
||||
import { expandFirstAlertActions } from '../../../tasks/alerts';
|
||||
import { createRule } from '../../../tasks/api_calls/rules';
|
||||
import { cleanKibana } from '../../../tasks/common';
|
||||
import { waitForAlertsToPopulate } from '../../../tasks/create_new_rule';
|
||||
import { login, visit, waitForPageWithoutDateRange } from '../../../tasks/login';
|
||||
|
||||
import { ALERTS_URL } from '../../urls/navigation';
|
||||
import { ATTACH_ALERT_TO_CASE_BUTTON, ATTACH_TO_NEW_CASE_BUTTON } from '../../screens/alerts';
|
||||
import { LOADING_INDICATOR } from '../../screens/security_header';
|
||||
import { ALERTS_URL } from '../../../urls/navigation';
|
||||
import { ATTACH_ALERT_TO_CASE_BUTTON, ATTACH_TO_NEW_CASE_BUTTON } from '../../../screens/alerts';
|
||||
import { LOADING_INDICATOR } from '../../../screens/security_header';
|
||||
|
||||
const loadDetectionsPage = (role: ROLES) => {
|
||||
login(role);
|
|
@ -5,19 +5,19 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { login, visitTimeline } from '../../tasks/login';
|
||||
import { login, visitTimeline } from '../../../tasks/login';
|
||||
import {
|
||||
attachTimelineToNewCase,
|
||||
attachTimelineToExistingCase,
|
||||
addNewCase,
|
||||
selectCase,
|
||||
} from '../../tasks/timeline';
|
||||
import { DESCRIPTION_INPUT, ADD_COMMENT_INPUT } from '../../screens/create_new_case';
|
||||
import { getCase1 } from '../../objects/case';
|
||||
import { getTimeline } from '../../objects/timeline';
|
||||
import { createTimeline } from '../../tasks/api_calls/timelines';
|
||||
import { cleanKibana, deleteTimelines } from '../../tasks/common';
|
||||
import { createCase } from '../../tasks/api_calls/cases';
|
||||
} from '../../../tasks/timeline';
|
||||
import { DESCRIPTION_INPUT, ADD_COMMENT_INPUT } from '../../../screens/create_new_case';
|
||||
import { getCase1 } from '../../../objects/case';
|
||||
import { getTimeline } from '../../../objects/timeline';
|
||||
import { createTimeline } from '../../../tasks/api_calls/timelines';
|
||||
import { cleanKibana, deleteTimelines } from '../../../tasks/common';
|
||||
import { createCase } from '../../../tasks/api_calls/cases';
|
||||
|
||||
describe('attach timeline to case', () => {
|
||||
context('without cases created', () => {
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { login, visitWithoutDateRange } from '../../tasks/login';
|
||||
import { login, visitWithoutDateRange } from '../../../tasks/login';
|
||||
import {
|
||||
getCase1,
|
||||
getConnectorIds,
|
||||
|
@ -15,18 +15,18 @@ import {
|
|||
getJiraConnectorOptions,
|
||||
getServiceNowConnectorOptions,
|
||||
getCaseResponse,
|
||||
} from '../../objects/case';
|
||||
} from '../../../objects/case';
|
||||
import {
|
||||
createCase,
|
||||
fillCasesMandatoryfields,
|
||||
fillIbmResilientConnectorOptions,
|
||||
fillJiraConnectorOptions,
|
||||
fillServiceNowConnectorOptions,
|
||||
} from '../../tasks/create_new_case';
|
||||
import { goToCreateNewCase } from '../../tasks/all_cases';
|
||||
import { CASES_URL } from '../../urls/navigation';
|
||||
import { CONNECTOR_CARD_DETAILS, CONNECTOR_TITLE } from '../../screens/case_details';
|
||||
import { cleanKibana } from '../../tasks/common';
|
||||
} from '../../../tasks/create_new_case';
|
||||
import { goToCreateNewCase } from '../../../tasks/all_cases';
|
||||
import { CASES_URL } from '../../../urls/navigation';
|
||||
import { CONNECTOR_CARD_DETAILS, CONNECTOR_TITLE } from '../../../screens/case_details';
|
||||
import { cleanKibana } from '../../../tasks/common';
|
||||
|
||||
describe('Cases connector incident fields', () => {
|
||||
before(() => {
|
|
@ -5,20 +5,20 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { getServiceNowConnector, getServiceNowITSMHealthResponse } from '../../objects/case';
|
||||
import { getServiceNowConnector, getServiceNowITSMHealthResponse } from '../../../objects/case';
|
||||
|
||||
import { SERVICE_NOW_MAPPING } from '../../screens/configure_cases';
|
||||
import { SERVICE_NOW_MAPPING } from '../../../screens/configure_cases';
|
||||
|
||||
import { goToEditExternalConnection } from '../../tasks/all_cases';
|
||||
import { cleanKibana, deleteCases, deleteConnectors } from '../../tasks/common';
|
||||
import { goToEditExternalConnection } from '../../../tasks/all_cases';
|
||||
import { cleanKibana, deleteCases, deleteConnectors } from '../../../tasks/common';
|
||||
import {
|
||||
addServiceNowConnector,
|
||||
openAddNewConnectorOption,
|
||||
verifyNewConnectorSelected,
|
||||
} from '../../tasks/configure_cases';
|
||||
import { login, visitWithoutDateRange } from '../../tasks/login';
|
||||
} from '../../../tasks/configure_cases';
|
||||
import { login, visitWithoutDateRange } from '../../../tasks/login';
|
||||
|
||||
import { CASES_URL } from '../../urls/navigation';
|
||||
import { CASES_URL } from '../../../urls/navigation';
|
||||
|
||||
describe('Cases connectors', () => {
|
||||
const configureResult = {
|
|
@ -5,8 +5,8 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import type { TestCase } from '../../objects/case';
|
||||
import { getCase1 } from '../../objects/case';
|
||||
import type { TestCase } from '../../../objects/case';
|
||||
import { getCase1 } from '../../../objects/case';
|
||||
|
||||
import {
|
||||
ALL_CASES_CLOSED_CASES_STATS,
|
||||
|
@ -20,7 +20,7 @@ import {
|
|||
ALL_CASES_SERVICE_NOW_INCIDENT,
|
||||
ALL_CASES_TAGS,
|
||||
ALL_CASES_TAGS_COUNT,
|
||||
} from '../../screens/all_cases';
|
||||
} from '../../../screens/all_cases';
|
||||
import {
|
||||
CASE_DETAILS_DESCRIPTION,
|
||||
CASE_DETAILS_PAGE_TITLE,
|
||||
|
@ -33,25 +33,25 @@ import {
|
|||
EXPECTED_METRICS,
|
||||
CASES_METRIC,
|
||||
UNEXPECTED_METRICS,
|
||||
} from '../../screens/case_details';
|
||||
import { TIMELINE_DESCRIPTION, TIMELINE_QUERY, TIMELINE_TITLE } from '../../screens/timeline';
|
||||
} from '../../../screens/case_details';
|
||||
import { TIMELINE_DESCRIPTION, TIMELINE_QUERY, TIMELINE_TITLE } from '../../../screens/timeline';
|
||||
|
||||
import { OVERVIEW_CASE_DESCRIPTION, OVERVIEW_CASE_NAME } from '../../screens/overview';
|
||||
import { OVERVIEW_CASE_DESCRIPTION, OVERVIEW_CASE_NAME } from '../../../screens/overview';
|
||||
|
||||
import { goToCaseDetails, goToCreateNewCase } from '../../tasks/all_cases';
|
||||
import { createTimeline } from '../../tasks/api_calls/timelines';
|
||||
import { openCaseTimeline } from '../../tasks/case_details';
|
||||
import { cleanKibana } from '../../tasks/common';
|
||||
import { goToCaseDetails, goToCreateNewCase } from '../../../tasks/all_cases';
|
||||
import { createTimeline } from '../../../tasks/api_calls/timelines';
|
||||
import { openCaseTimeline } from '../../../tasks/case_details';
|
||||
import { cleanKibana } from '../../../tasks/common';
|
||||
import {
|
||||
attachTimeline,
|
||||
backToCases,
|
||||
createCase,
|
||||
fillCasesMandatoryfields,
|
||||
filterStatusOpen,
|
||||
} from '../../tasks/create_new_case';
|
||||
import { loginWithUser, visit, visitWithoutDateRange } from '../../tasks/login';
|
||||
} from '../../../tasks/create_new_case';
|
||||
import { loginWithUser, visit, visitWithoutDateRange } from '../../../tasks/login';
|
||||
|
||||
import { CASES_URL, OVERVIEW_URL } from '../../urls/navigation';
|
||||
import { CASES_URL, OVERVIEW_URL } from '../../../urls/navigation';
|
||||
|
||||
describe('Cases', () => {
|
||||
before(() => {
|
|
@ -5,19 +5,19 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import type { TestCaseWithoutTimeline } from '../../objects/case';
|
||||
import { ALL_CASES_CREATE_NEW_CASE_BTN, ALL_CASES_NAME } from '../../screens/all_cases';
|
||||
import type { TestCaseWithoutTimeline } from '../../../objects/case';
|
||||
import { ALL_CASES_CREATE_NEW_CASE_BTN, ALL_CASES_NAME } from '../../../screens/all_cases';
|
||||
|
||||
import { goToCreateNewCase } from '../../tasks/all_cases';
|
||||
import { cleanKibana, deleteCases } from '../../tasks/common';
|
||||
import { goToCreateNewCase } from '../../../tasks/all_cases';
|
||||
import { cleanKibana, deleteCases } from '../../../tasks/common';
|
||||
|
||||
import {
|
||||
backToCases,
|
||||
createCase,
|
||||
fillCasesMandatoryfields,
|
||||
filterStatusOpen,
|
||||
} from '../../tasks/create_new_case';
|
||||
import { login, loginWithUser, visitWithUser } from '../../tasks/login';
|
||||
} from '../../../tasks/create_new_case';
|
||||
import { login, loginWithUser, visitWithUser } from '../../../tasks/login';
|
||||
import {
|
||||
createUsersAndRoles,
|
||||
deleteUsersAndRoles,
|
||||
|
@ -29,9 +29,9 @@ import {
|
|||
secAllCasesNoDeleteUser,
|
||||
secAllCasesOnlyReadDeleteUser,
|
||||
secAllCasesOnlyReadDelete,
|
||||
} from '../../tasks/privileges';
|
||||
} from '../../../tasks/privileges';
|
||||
|
||||
import { CASES_URL } from '../../urls/navigation';
|
||||
import { CASES_URL } from '../../../urls/navigation';
|
||||
const usersToCreate = [
|
||||
secAllUser,
|
||||
secReadCasesAllUser,
|
|
@ -5,30 +5,30 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { getNewRule } from '../../objects/rule';
|
||||
import { getNewRule } from '../../../objects/rule';
|
||||
import {
|
||||
ENABLE_HOST_RISK_SCORE_BUTTON,
|
||||
ENABLE_USER_RISK_SCORE_BUTTON,
|
||||
RISK_SCORE_DASHBOARDS_INSTALLATION_SUCCESS_TOAST,
|
||||
RISK_SCORE_INSTALLATION_SUCCESS_TOAST,
|
||||
} from '../../screens/entity_analytics';
|
||||
} from '../../../screens/entity_analytics';
|
||||
import {
|
||||
deleteRiskScore,
|
||||
interceptInstallRiskScoreModule,
|
||||
waitForInstallRiskScoreModule,
|
||||
} from '../../tasks/api_calls/risk_scores';
|
||||
import { findSavedObjects } from '../../tasks/api_calls/risk_scores/saved_objects';
|
||||
import { createRule } from '../../tasks/api_calls/rules';
|
||||
import { cleanKibana } from '../../tasks/common';
|
||||
import { login, visit } from '../../tasks/login';
|
||||
import { clickEnableRiskScore } from '../../tasks/risk_scores';
|
||||
import { RiskScoreEntity } from '../../tasks/risk_scores/common';
|
||||
} from '../../../tasks/api_calls/risk_scores';
|
||||
import { findSavedObjects } from '../../../tasks/api_calls/risk_scores/saved_objects';
|
||||
import { createRule } from '../../../tasks/api_calls/rules';
|
||||
import { cleanKibana } from '../../../tasks/common';
|
||||
import { login, visit } from '../../../tasks/login';
|
||||
import { clickEnableRiskScore } from '../../../tasks/risk_scores';
|
||||
import { RiskScoreEntity } from '../../../tasks/risk_scores/common';
|
||||
import {
|
||||
getRiskScoreLatestTransformId,
|
||||
getRiskScorePivotTransformId,
|
||||
getTransformState,
|
||||
} from '../../tasks/risk_scores/transforms';
|
||||
import { ENTITY_ANALYTICS_URL } from '../../urls/navigation';
|
||||
} from '../../../tasks/risk_scores/transforms';
|
||||
import { ENTITY_ANALYTICS_URL } from '../../../urls/navigation';
|
||||
|
||||
const spaceId = 'default';
|
||||
|
|
@ -5,12 +5,12 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { login, visit } from '../../tasks/login';
|
||||
import { login, visit } from '../../../tasks/login';
|
||||
|
||||
import { ALERTS_URL, ENTITY_ANALYTICS_URL } from '../../urls/navigation';
|
||||
import { ALERTS_URL, ENTITY_ANALYTICS_URL } from '../../../urls/navigation';
|
||||
|
||||
import { esArchiverLoad, esArchiverUnload } from '../../tasks/es_archiver';
|
||||
import { cleanKibana, deleteAlertsAndRules } from '../../tasks/common';
|
||||
import { esArchiverLoad, esArchiverUnload } from '../../../tasks/es_archiver';
|
||||
import { cleanKibana, deleteAlertsAndRules } from '../../../tasks/common';
|
||||
import {
|
||||
ANOMALIES_TABLE,
|
||||
ANOMALIES_TABLE_ROWS,
|
||||
|
@ -32,16 +32,19 @@ import {
|
|||
ANOMALIES_TABLE_ENABLE_JOB_BUTTON,
|
||||
ANOMALIES_TABLE_ENABLE_JOB_LOADER,
|
||||
ANOMALIES_TABLE_COUNT_COLUMN,
|
||||
} from '../../screens/entity_analytics';
|
||||
import { openRiskTableFilterAndSelectTheLowOption, removeLowFilter } from '../../tasks/host_risk';
|
||||
import { createRule } from '../../tasks/api_calls/rules';
|
||||
import { waitForAlertsToPopulate } from '../../tasks/create_new_rule';
|
||||
import { getNewRule } from '../../objects/rule';
|
||||
import { clickOnFirstHostsAlerts, clickOnFirstUsersAlerts } from '../../tasks/risk_scores';
|
||||
import { OPTION_LIST_LABELS, OPTION_LIST_VALUES } from '../../screens/common/filter_group';
|
||||
import { setRowsPerPageTo } from '../../tasks/table_pagination';
|
||||
import { clearSearchBar, kqlSearch } from '../../tasks/security_header';
|
||||
import { setEndDate, setEndDateNow, updateDates } from '../../tasks/date_picker';
|
||||
} from '../../../screens/entity_analytics';
|
||||
import {
|
||||
openRiskTableFilterAndSelectTheLowOption,
|
||||
removeLowFilter,
|
||||
} from '../../../tasks/host_risk';
|
||||
import { createRule } from '../../../tasks/api_calls/rules';
|
||||
import { waitForAlertsToPopulate } from '../../../tasks/create_new_rule';
|
||||
import { getNewRule } from '../../../objects/rule';
|
||||
import { clickOnFirstHostsAlerts, clickOnFirstUsersAlerts } from '../../../tasks/risk_scores';
|
||||
import { OPTION_LIST_LABELS, OPTION_LIST_VALUES } from '../../../screens/common/filter_group';
|
||||
import { setRowsPerPageTo } from '../../../tasks/table_pagination';
|
||||
import { clearSearchBar, kqlSearch } from '../../../tasks/security_header';
|
||||
import { setEndDate, setEndDateNow, updateDates } from '../../../tasks/date_picker';
|
||||
|
||||
const TEST_USER_ALERTS = 2;
|
||||
const TEST_USER_NAME = 'test';
|
|
@ -5,7 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { getNewRule } from '../../objects/rule';
|
||||
import { getNewRule } from '../../../objects/rule';
|
||||
import {
|
||||
RISK_SCORE_INSTALLATION_SUCCESS_TOAST,
|
||||
UPGRADE_HOST_RISK_SCORE_BUTTON,
|
||||
|
@ -13,25 +13,28 @@ import {
|
|||
UPGRADE_CANCELLATION_BUTTON,
|
||||
UPGRADE_CONFIRMATION_MODAL,
|
||||
RISK_SCORE_DASHBOARDS_INSTALLATION_SUCCESS_TOAST,
|
||||
} from '../../screens/entity_analytics';
|
||||
import { deleteRiskScore, installLegacyRiskScoreModule } from '../../tasks/api_calls/risk_scores';
|
||||
import { findSavedObjects } from '../../tasks/api_calls/risk_scores/saved_objects';
|
||||
import { createRule } from '../../tasks/api_calls/rules';
|
||||
import { cleanKibana } from '../../tasks/common';
|
||||
import { login, visit } from '../../tasks/login';
|
||||
} from '../../../screens/entity_analytics';
|
||||
import {
|
||||
deleteRiskScore,
|
||||
installLegacyRiskScoreModule,
|
||||
} from '../../../tasks/api_calls/risk_scores';
|
||||
import { findSavedObjects } from '../../../tasks/api_calls/risk_scores/saved_objects';
|
||||
import { createRule } from '../../../tasks/api_calls/rules';
|
||||
import { cleanKibana } from '../../../tasks/common';
|
||||
import { login, visit } from '../../../tasks/login';
|
||||
import {
|
||||
clickUpgradeRiskScore,
|
||||
clickUpgradeRiskScoreConfirmed,
|
||||
interceptUpgradeRiskScoreModule,
|
||||
waitForUpgradeRiskScoreModule,
|
||||
} from '../../tasks/risk_scores';
|
||||
import { RiskScoreEntity } from '../../tasks/risk_scores/common';
|
||||
} from '../../../tasks/risk_scores';
|
||||
import { RiskScoreEntity } from '../../../tasks/risk_scores/common';
|
||||
import {
|
||||
getRiskScoreLatestTransformId,
|
||||
getRiskScorePivotTransformId,
|
||||
getTransformState,
|
||||
} from '../../tasks/risk_scores/transforms';
|
||||
import { ENTITY_ANALYTICS_URL } from '../../urls/navigation';
|
||||
} from '../../../tasks/risk_scores/transforms';
|
||||
import { ENTITY_ANALYTICS_URL } from '../../../urls/navigation';
|
||||
|
||||
const spaceId = 'default';
|
||||
|
|
@ -5,19 +5,22 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { login, visitWithoutDateRange } from '../../tasks/login';
|
||||
import { login, visitWithoutDateRange } from '../../../tasks/login';
|
||||
|
||||
import {
|
||||
GLOBAL_SEARCH_BAR_FILTER_ITEM,
|
||||
GLOBAL_SEARCH_BAR_PINNED_FILTER,
|
||||
} from '../../screens/search_bar';
|
||||
import { DISCOVER_WITH_FILTER_URL, DISCOVER_WITH_PINNED_FILTER_URL } from '../../urls/navigation';
|
||||
} from '../../../screens/search_bar';
|
||||
import {
|
||||
DISCOVER_WITH_FILTER_URL,
|
||||
DISCOVER_WITH_PINNED_FILTER_URL,
|
||||
} from '../../../urls/navigation';
|
||||
import {
|
||||
navigateFromKibanaCollapsibleTo,
|
||||
openKibanaNavigation,
|
||||
} from '../../tasks/kibana_navigation';
|
||||
import { ALERTS_PAGE } from '../../screens/kibana_navigation';
|
||||
import { postDataView } from '../../tasks/common';
|
||||
} from '../../../tasks/kibana_navigation';
|
||||
import { ALERTS_PAGE } from '../../../screens/kibana_navigation';
|
||||
import { postDataView } from '../../../tasks/common';
|
||||
|
||||
describe('pinned filters', () => {
|
||||
before(() => {
|
|
@ -5,9 +5,9 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { navigateFromHeaderTo } from '../../tasks/security_header';
|
||||
import { ALERTS, TIMELINES } from '../../screens/security_header';
|
||||
import { closeAlertFlyout, expandFirstAlert } from '../../tasks/alerts';
|
||||
import { navigateFromHeaderTo } from '../../../tasks/security_header';
|
||||
import { ALERTS, TIMELINES } from '../../../screens/security_header';
|
||||
import { closeAlertFlyout, expandFirstAlert } from '../../../tasks/alerts';
|
||||
import {
|
||||
assertTourStepExist,
|
||||
assertTourStepNotExist,
|
||||
|
@ -18,15 +18,15 @@ import {
|
|||
finishTour,
|
||||
goToStep,
|
||||
startTour,
|
||||
} from '../../tasks/guided_onboarding';
|
||||
import { cleanKibana } from '../../tasks/common';
|
||||
import { createRule } from '../../tasks/api_calls/rules';
|
||||
import { getNewRule } from '../../objects/rule';
|
||||
import { ALERTS_URL, DASHBOARDS_URL } from '../../urls/navigation';
|
||||
import { waitForAlertsToPopulate } from '../../tasks/create_new_rule';
|
||||
import { login, visit } from '../../tasks/login';
|
||||
import { quitGlobalTour, startAlertsCasesTour } from '../../tasks/api_calls/tour';
|
||||
import { AlertsCasesTourSteps } from '../../../public/common/components/guided_onboarding_tour/tour_config';
|
||||
} from '../../../tasks/guided_onboarding';
|
||||
import { cleanKibana } from '../../../tasks/common';
|
||||
import { createRule } from '../../../tasks/api_calls/rules';
|
||||
import { getNewRule } from '../../../objects/rule';
|
||||
import { ALERTS_URL, DASHBOARDS_URL } from '../../../urls/navigation';
|
||||
import { waitForAlertsToPopulate } from '../../../tasks/create_new_rule';
|
||||
import { login, visit } from '../../../tasks/login';
|
||||
import { quitGlobalTour, startAlertsCasesTour } from '../../../tasks/api_calls/tour';
|
||||
import { AlertsCasesTourSteps } from '../../../../public/common/components/guided_onboarding_tour/tour_config';
|
||||
|
||||
describe('Guided onboarding tour', () => {
|
||||
before(() => {
|
|
@ -5,11 +5,11 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { login, visitHostDetailsPage } from '../../tasks/login';
|
||||
import { login, visitHostDetailsPage } from '../../../tasks/login';
|
||||
|
||||
import { cleanKibana } from '../../tasks/common';
|
||||
import { esArchiverLoad, esArchiverUnload } from '../../tasks/es_archiver';
|
||||
import { TABLE_CELL, TABLE_ROWS } from '../../screens/alerts_details';
|
||||
import { cleanKibana } from '../../../tasks/common';
|
||||
import { esArchiverLoad, esArchiverUnload } from '../../../tasks/es_archiver';
|
||||
import { TABLE_CELL, TABLE_ROWS } from '../../../screens/alerts_details';
|
||||
|
||||
describe('risk tab', () => {
|
||||
before(() => {
|
|
@ -9,32 +9,32 @@ import {
|
|||
FIELDS_BROWSER_CHECKBOX,
|
||||
FIELDS_BROWSER_SELECTED_CATEGORIES_BADGES,
|
||||
FIELDS_BROWSER_VIEW_BUTTON,
|
||||
} from '../../screens/fields_browser';
|
||||
} from '../../../screens/fields_browser';
|
||||
import {
|
||||
HOST_GEO_CITY_NAME_HEADER,
|
||||
HOST_GEO_COUNTRY_NAME_HEADER,
|
||||
SERVER_SIDE_EVENT_COUNT,
|
||||
} from '../../screens/hosts/events';
|
||||
} from '../../../screens/hosts/events';
|
||||
|
||||
import {
|
||||
activateViewAll,
|
||||
activateViewSelected,
|
||||
closeFieldsBrowser,
|
||||
filterFieldsBrowser,
|
||||
} from '../../tasks/fields_browser';
|
||||
import { login, visit } from '../../tasks/login';
|
||||
import { openEvents } from '../../tasks/hosts/main';
|
||||
} from '../../../tasks/fields_browser';
|
||||
import { login, visit } from '../../../tasks/login';
|
||||
import { openEvents } from '../../../tasks/hosts/main';
|
||||
import {
|
||||
addsHostGeoCityNameToHeader,
|
||||
addsHostGeoCountryNameToHeader,
|
||||
openEventsViewerFieldsBrowser,
|
||||
waitsForEventsToBeLoaded,
|
||||
} from '../../tasks/hosts/events';
|
||||
import { kqlSearch } from '../../tasks/security_header';
|
||||
} from '../../../tasks/hosts/events';
|
||||
import { kqlSearch } from '../../../tasks/security_header';
|
||||
|
||||
import { HOSTS_URL } from '../../urls/navigation';
|
||||
import { resetFields } from '../../tasks/timeline';
|
||||
import { esArchiverLoad, esArchiverUnload } from '../../tasks/es_archiver';
|
||||
import { HOSTS_URL } from '../../../urls/navigation';
|
||||
import { resetFields } from '../../../tasks/timeline';
|
||||
import { esArchiverLoad, esArchiverUnload } from '../../../tasks/es_archiver';
|
||||
|
||||
const defaultHeadersInDefaultEcsCategory = [
|
||||
{ id: '@timestamp' },
|
|
@ -5,22 +5,22 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { cleanKibana } from '../../tasks/common';
|
||||
import { esArchiverLoad, esArchiverUnload } from '../../tasks/es_archiver';
|
||||
import { cleanKibana } from '../../../tasks/common';
|
||||
import { esArchiverLoad, esArchiverUnload } from '../../../tasks/es_archiver';
|
||||
import {
|
||||
navigateToHostRiskDetailTab,
|
||||
openRiskTableFilterAndSelectTheCriticalOption,
|
||||
removeCriticalFilter,
|
||||
selectFiveItemsPerPageOption,
|
||||
} from '../../tasks/host_risk';
|
||||
} from '../../../tasks/host_risk';
|
||||
import {
|
||||
HOST_BY_RISK_TABLE_CELL,
|
||||
HOST_BY_RISK_TABLE_HOSTNAME_CELL,
|
||||
HOST_BY_RISK_TABLE_NEXT_PAGE_BUTTON,
|
||||
} from '../../screens/hosts/host_risk';
|
||||
import { login, visit } from '../../tasks/login';
|
||||
import { HOSTS_URL } from '../../urls/navigation';
|
||||
import { clearSearchBar, kqlSearch } from '../../tasks/security_header';
|
||||
} from '../../../screens/hosts/host_risk';
|
||||
import { login, visit } from '../../../tasks/login';
|
||||
import { HOSTS_URL } from '../../../urls/navigation';
|
||||
import { clearSearchBar, kqlSearch } from '../../../tasks/security_header';
|
||||
|
||||
describe('risk tab', () => {
|
||||
before(() => {
|
|
@ -5,13 +5,13 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { login, visit } from '../../tasks/login';
|
||||
import { login, visit } from '../../../tasks/login';
|
||||
|
||||
import { HOSTS_URL } from '../../urls/navigation';
|
||||
import { cleanKibana } from '../../tasks/common';
|
||||
import { esArchiverLoad, esArchiverUnload } from '../../tasks/es_archiver';
|
||||
import { TABLE_CELL } from '../../screens/alerts_details';
|
||||
import { kqlSearch } from '../../tasks/security_header';
|
||||
import { HOSTS_URL } from '../../../urls/navigation';
|
||||
import { cleanKibana } from '../../../tasks/common';
|
||||
import { esArchiverLoad, esArchiverUnload } from '../../../tasks/es_archiver';
|
||||
import { TABLE_CELL } from '../../../screens/alerts_details';
|
||||
import { kqlSearch } from '../../../tasks/security_header';
|
||||
|
||||
describe('All hosts table', () => {
|
||||
before(() => {
|
|
@ -4,12 +4,12 @@
|
|||
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||
* 2.0.
|
||||
*/
|
||||
import { TOP_N_CONTAINER } from '../../screens/network/flows';
|
||||
import { GLOBAL_SEARCH_BAR_FILTER_ITEM } from '../../screens/search_bar';
|
||||
import { DATA_PROVIDERS } from '../../screens/timeline';
|
||||
import { TOP_N_CONTAINER } from '../../../screens/network/flows';
|
||||
import { GLOBAL_SEARCH_BAR_FILTER_ITEM } from '../../../screens/search_bar';
|
||||
import { DATA_PROVIDERS } from '../../../screens/timeline';
|
||||
|
||||
import { login, visit } from '../../tasks/login';
|
||||
import { NETWORK_URL } from '../../urls/navigation';
|
||||
import { login, visit } from '../../../tasks/login';
|
||||
import { NETWORK_URL } from '../../../urls/navigation';
|
||||
import {
|
||||
clickOnAddToTimeline,
|
||||
clickOnCopyValue,
|
||||
|
@ -18,9 +18,9 @@ import {
|
|||
clickOnShowTopN,
|
||||
mouseoverOnToOverflowItem,
|
||||
openHoverActions,
|
||||
} from '../../tasks/network/flows';
|
||||
import { openTimelineUsingToggle } from '../../tasks/security_main';
|
||||
import { esArchiverLoad, esArchiverUnload } from '../../tasks/es_archiver';
|
||||
} from '../../../tasks/network/flows';
|
||||
import { openTimelineUsingToggle } from '../../../tasks/security_main';
|
||||
import { esArchiverLoad, esArchiverUnload } from '../../../tasks/es_archiver';
|
||||
|
||||
const testDomain = 'myTest';
|
||||
|
|
@ -12,13 +12,13 @@ import {
|
|||
FILTER_IN,
|
||||
FILTER_OUT,
|
||||
SHOW_TOP_FIELD,
|
||||
} from '../../screens/network/flows';
|
||||
import { esArchiverLoad, esArchiverUnload } from '../../tasks/es_archiver';
|
||||
} from '../../../screens/network/flows';
|
||||
import { esArchiverLoad, esArchiverUnload } from '../../../tasks/es_archiver';
|
||||
|
||||
import { login, visit } from '../../tasks/login';
|
||||
import { mouseoverOnToOverflowItem, openHoverActions } from '../../tasks/network/flows';
|
||||
import { login, visit } from '../../../tasks/login';
|
||||
import { mouseoverOnToOverflowItem, openHoverActions } from '../../../tasks/network/flows';
|
||||
|
||||
import { NETWORK_URL } from '../../urls/navigation';
|
||||
import { NETWORK_URL } from '../../../urls/navigation';
|
||||
|
||||
const testDomainOne = 'myTest';
|
||||
const testDomainTwo = 'myTest2';
|
|
@ -5,17 +5,17 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { HOST_STATS, NETWORK_STATS, OVERVIEW_EMPTY_PAGE } from '../../screens/overview';
|
||||
import { HOST_STATS, NETWORK_STATS, OVERVIEW_EMPTY_PAGE } from '../../../screens/overview';
|
||||
|
||||
import { expandHostStats, expandNetworkStats } from '../../tasks/overview';
|
||||
import { login, visit } from '../../tasks/login';
|
||||
import { expandHostStats, expandNetworkStats } from '../../../tasks/overview';
|
||||
import { login, visit } from '../../../tasks/login';
|
||||
|
||||
import { OVERVIEW_URL } from '../../urls/navigation';
|
||||
import { OVERVIEW_URL } from '../../../urls/navigation';
|
||||
|
||||
import { cleanKibana } from '../../tasks/common';
|
||||
import { createTimeline, favoriteTimeline } from '../../tasks/api_calls/timelines';
|
||||
import { getTimeline } from '../../objects/timeline';
|
||||
import { esArchiverLoad, esArchiverUnload } from '../../tasks/es_archiver';
|
||||
import { cleanKibana } from '../../../tasks/common';
|
||||
import { createTimeline, favoriteTimeline } from '../../../tasks/api_calls/timelines';
|
||||
import { getTimeline } from '../../../objects/timeline';
|
||||
import { esArchiverLoad, esArchiverUnload } from '../../../tasks/es_archiver';
|
||||
|
||||
describe('Overview Page', () => {
|
||||
before(() => {
|
|
@ -8,18 +8,18 @@
|
|||
import {
|
||||
PROCESS_NAME_FIELD,
|
||||
UNCOMMON_PROCESSES_TABLE,
|
||||
} from '../../screens/hosts/uncommon_processes';
|
||||
import { TABLE_FIRST_PAGE, TABLE_SECOND_PAGE } from '../../screens/table_pagination';
|
||||
import { esArchiverLoad, esArchiverUnload } from '../../tasks/es_archiver';
|
||||
import { waitsForEventsToBeLoaded } from '../../tasks/hosts/events';
|
||||
import { openEvents, openUncommonProcesses } from '../../tasks/hosts/main';
|
||||
import { waitForUncommonProcessesToBeLoaded } from '../../tasks/hosts/uncommon_processes';
|
||||
import { login, visit } from '../../tasks/login';
|
||||
import { refreshPage } from '../../tasks/security_header';
|
||||
import { HOSTS_URL, USERS_URL, HOSTS_PAGE_TAB_URLS } from '../../urls/navigation';
|
||||
import { ALL_HOSTS_TABLE } from '../../screens/hosts/all_hosts';
|
||||
import { ALL_USERS_TABLE } from '../../screens/users/all_users';
|
||||
import { goToTablePage, sortFirstTableColumn } from '../../tasks/table_pagination';
|
||||
} from '../../../screens/hosts/uncommon_processes';
|
||||
import { TABLE_FIRST_PAGE, TABLE_SECOND_PAGE } from '../../../screens/table_pagination';
|
||||
import { esArchiverLoad, esArchiverUnload } from '../../../tasks/es_archiver';
|
||||
import { waitsForEventsToBeLoaded } from '../../../tasks/hosts/events';
|
||||
import { openEvents, openUncommonProcesses } from '../../../tasks/hosts/main';
|
||||
import { waitForUncommonProcessesToBeLoaded } from '../../../tasks/hosts/uncommon_processes';
|
||||
import { login, visit } from '../../../tasks/login';
|
||||
import { refreshPage } from '../../../tasks/security_header';
|
||||
import { HOSTS_URL, USERS_URL, HOSTS_PAGE_TAB_URLS } from '../../../urls/navigation';
|
||||
import { ALL_HOSTS_TABLE } from '../../../screens/hosts/all_hosts';
|
||||
import { ALL_USERS_TABLE } from '../../../screens/users/all_users';
|
||||
import { goToTablePage, sortFirstTableColumn } from '../../../tasks/table_pagination';
|
||||
|
||||
describe('Pagination', () => {
|
||||
describe('Host uncommon processes table)', () => {
|
|
@ -5,20 +5,20 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { ALERT_FLYOUT } from '../../screens/alerts_details';
|
||||
import { createRule } from '../../tasks/api_calls/rules';
|
||||
import { cleanKibana } from '../../tasks/common';
|
||||
import { waitForAlertsToPopulate } from '../../tasks/create_new_rule';
|
||||
import { login, visitWithoutDateRange } from '../../tasks/login';
|
||||
import { refreshPage } from '../../tasks/security_header';
|
||||
import { getNewRule } from '../../objects/rule';
|
||||
import { ALERTS_URL } from '../../urls/navigation';
|
||||
import { ALERT_FLYOUT } from '../../../screens/alerts_details';
|
||||
import { createRule } from '../../../tasks/api_calls/rules';
|
||||
import { cleanKibana } from '../../../tasks/common';
|
||||
import { waitForAlertsToPopulate } from '../../../tasks/create_new_rule';
|
||||
import { login, visitWithoutDateRange } from '../../../tasks/login';
|
||||
import { refreshPage } from '../../../tasks/security_header';
|
||||
import { getNewRule } from '../../../objects/rule';
|
||||
import { ALERTS_URL } from '../../../urls/navigation';
|
||||
import {
|
||||
expandAlertTableCellValue,
|
||||
openUserDetailsFlyout,
|
||||
scrollAlertTableColumnIntoView,
|
||||
} from '../../tasks/alerts';
|
||||
import { USER_COLUMN } from '../../screens/alerts';
|
||||
} from '../../../tasks/alerts';
|
||||
import { USER_COLUMN } from '../../../screens/alerts';
|
||||
|
||||
describe('user details flyout', () => {
|
||||
beforeEach(() => {
|
|
@ -5,20 +5,20 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import { HEADER_SUBTITLE, ALL_USERS_TABLE } from '../../screens/users/all_users';
|
||||
import { ANOMALIES_TAB, ANOMALIES_TAB_CONTENT } from '../../screens/users/user_anomalies';
|
||||
import { HEADER_SUBTITLE, ALL_USERS_TABLE } from '../../../screens/users/all_users';
|
||||
import { ANOMALIES_TAB, ANOMALIES_TAB_CONTENT } from '../../../screens/users/user_anomalies';
|
||||
import {
|
||||
AUTHENTICATIONS_TAB,
|
||||
AUTHENTICATIONS_TABLE,
|
||||
} from '../../screens/users/user_authentications';
|
||||
import { EVENTS_TAB, EVENTS_TAB_CONTENT } from '../../screens/users/user_events';
|
||||
import { RISK_SCORE_TAB, RISK_SCORE_TAB_CONTENT } from '../../screens/users/user_risk_score';
|
||||
import { cleanKibana } from '../../tasks/common';
|
||||
import { esArchiverLoad, esArchiverUnload } from '../../tasks/es_archiver';
|
||||
} from '../../../screens/users/user_authentications';
|
||||
import { EVENTS_TAB, EVENTS_TAB_CONTENT } from '../../../screens/users/user_events';
|
||||
import { RISK_SCORE_TAB, RISK_SCORE_TAB_CONTENT } from '../../../screens/users/user_risk_score';
|
||||
import { cleanKibana } from '../../../tasks/common';
|
||||
import { esArchiverLoad, esArchiverUnload } from '../../../tasks/es_archiver';
|
||||
|
||||
import { login, visit, visitUserDetailsPage } from '../../tasks/login';
|
||||
import { login, visit, visitUserDetailsPage } from '../../../tasks/login';
|
||||
|
||||
import { USERS_URL } from '../../urls/navigation';
|
||||
import { USERS_URL } from '../../../urls/navigation';
|
||||
|
||||
describe('Users stats and tables', () => {
|
||||
before(() => {
|
|
@ -11,20 +11,20 @@
|
|||
"cypress:open": "TZ=UTC node ./scripts/start_cypress_parallel open --spec './cypress/e2e/**/*.cy.ts' --config-file ./cypress/cypress.config.ts --ftr-config-file ../../../../../../x-pack/test/security_solution_cypress/cli_config",
|
||||
"cypress:open:ccs": "yarn cypress:open --config specPattern=./cypress/ccs_e2e/**/*.cy.ts",
|
||||
"cypress:open:upgrade": "yarn cypress:open --config specPattern=./cypress/upgrade_e2e/**/*.cy.ts",
|
||||
"cypress:run": "yarn cypress:run:reporter --browser chrome --spec './cypress/e2e/{,!(investigations)/**/}*.cy.ts'; status=$?; yarn junit:merge && exit $status",
|
||||
"cypress:run:cases": "yarn cypress:run:reporter --browser chrome --spec './cypress/e2e/cases/*.cy.ts' --ftr-config-file ../../../../../../x-pack/test/security_solution_cypress/cases_cli_config; status=$?; yarn junit:merge && exit $status",
|
||||
"cypress:run": "yarn cypress:run:reporter --browser chrome --spec './cypress/e2e/{,!(investigations,explore)/**/}*.cy.ts'; status=$?; yarn junit:merge && exit $status",
|
||||
"cypress:run:cases": "yarn cypress:run:reporter --browser chrome --spec './cypress/e2e/explore/cases/*.cy.ts' --ftr-config-file ../../../../../../x-pack/test/security_solution_cypress/cli_config; status=$?; yarn junit:merge && exit $status",
|
||||
"cypress:run:firefox": "yarn cypress:run:reporter --browser firefox --spec './cypress/e2e/**/*.cy.ts'; status=$?; yarn junit:merge && exit $status",
|
||||
"cypress:run:reporter": "TZ=UTC node ./scripts/start_cypress_parallel run --config-file ./cypress/cypress_ci.config.ts --ftr-config-file ../../../../../../x-pack/test/security_solution_cypress/cli_config --reporter ../../../node_modules/cypress-multi-reporters --reporter-options configFile=./cypress/reporter_config.json",
|
||||
"cypress:run:respops": "yarn cypress:run:reporter --browser chrome --spec './cypress/e2e/(detection_alerts|detection_rules|exceptions)/*.cy.ts' --ftr-config-file ../../../../../../x-pack/test/security_solution_cypress/response_ops_cli_config; status=$?; yarn junit:merge && exit $status",
|
||||
"cypress:run:respops": "yarn cypress:run:reporter --browser chrome --spec './cypress/e2e/(detection_alerts|detection_rules|exceptions)/*.cy.ts' --ftr-config-file ../../../../../../x-pack/test/security_solution_cypress/cli_config; status=$?; yarn junit:merge && exit $status",
|
||||
"cypress:run:ccs": "yarn cypress:run:reporter --browser chrome --config specPattern=./cypress/ccs_e2e/**/*.cy.ts; status=$?; yarn junit:merge && exit $status",
|
||||
"cypress:run-as-ci": "node --max-old-space-size=2048 ../../../scripts/functional_tests --config ../../test/security_solution_cypress/cli_config_parallel.ts",
|
||||
"cypress:run-as-ci:firefox": "node --max-old-space-size=2048 ../../../scripts/functional_tests --config ../../test/security_solution_cypress/config.firefox.ts",
|
||||
"cypress:run:upgrade": "yarn cypress:run:reporter --browser chrome --config specPattern=./cypress/upgrade_e2e/**/*.cy.ts",
|
||||
"cypress:dw:open": "node ./scripts/start_cypress_parallel open --config-file ./public/management/cypress.config.ts ts --ftr-config-file ../../../../../../x-pack/test/defend_workflows_cypress/cli_config",
|
||||
"cypress:dw:run": "node ./scripts/start_cypress_parallel run --config-file ./public/management/cypress.config.ts --ftr-config-file ../../../../../../x-pack/test/defend_workflows_cypress/cli_config --reporter ../../../node_modules/cypress-multi-reporters --reporter-options configFile=./cypress/reporter_config.json; status=$?; yarn junit:merge && exit $status",
|
||||
"cypress:dw:endpoint:open": "yarn cypress open --config-file ./public/management/cypress_endpoint.config.ts",
|
||||
"cypress:dw:endpoint:open-as-ci": "node ../../../scripts/functional_tests --config ../../test/defend_workflows_cypress/endpoint_config.ts",
|
||||
"cypress:investigations:run": "yarn cypress:run:reporter --browser chrome --spec './cypress/e2e/investigations/**/*.cy.ts' --ftr-config-file ../../../../../../x-pack/test/security_solution_cypress/cli_config_investigations_parallel; status=$?; yarn junit:merge && exit $status",
|
||||
"cypress:investigations:run": "yarn cypress:run:reporter --browser chrome --spec './cypress/e2e/investigations/**/*.cy.ts' --ftr-config-file ../../../../../../x-pack/test/security_solution_cypress/cli_config; status=$?; yarn junit:merge && exit $status",
|
||||
"cypress:explore:run": "yarn cypress:run:reporter --browser chrome --spec './cypress/e2e/explore/**/*.cy.ts' --ftr-config-file ../../../../../../x-pack/test/security_solution_cypress/cli_config; status=$?; yarn junit:merge && exit $status",
|
||||
"junit:merge": "../../../node_modules/.bin/mochawesome-merge ../../../target/kibana-security-solution/cypress/results/mochawesome*.json > ../../../target/kibana-security-solution/cypress/results/output.json && ../../../node_modules/.bin/marge ../../../target/kibana-security-solution/cypress/results/output.json --reportDir ../../../target/kibana-security-solution/cypress/results && mkdir -p ../../../target/junit && cp ../../../target/kibana-security-solution/cypress/results/*.xml ../../../target/junit/",
|
||||
"test:generate": "node scripts/endpoint/resolver_generator"
|
||||
}
|
||||
|
|
|
@ -41,21 +41,34 @@ import pRetry from 'p-retry';
|
|||
import { renderSummaryTable } from './print_run';
|
||||
import { getLocalhostRealIp } from '../endpoint/common/localhost_services';
|
||||
|
||||
const retrieveIntegrations = (specPattern: string[]) => {
|
||||
/**
|
||||
* Retrieve test files using a glob pattern.
|
||||
* If process.env.RUN_ALL_TESTS is true, returns all matching files, otherwise, return files that should be run by this job based on process.env.BUILDKITE_PARALLEL_JOB_COUNT and process.env.BUILDKITE_PARALLEL_JOB
|
||||
*/
|
||||
const retrieveIntegrations = (
|
||||
/** Pattern passed to globby to find spec files. */ specPattern: string[]
|
||||
) => {
|
||||
const integrationsPaths = globby.sync(specPattern);
|
||||
|
||||
if (process.env.RUN_ALL_TESTS === 'true') {
|
||||
return integrationsPaths;
|
||||
} else {
|
||||
// The number of instances of this job were created
|
||||
const chunksTotal: number = process.env.BUILDKITE_PARALLEL_JOB_COUNT
|
||||
? parseInt(process.env.BUILDKITE_PARALLEL_JOB_COUNT, 10)
|
||||
: 1;
|
||||
// An index which uniquely identifies this instance of the job
|
||||
const chunkIndex: number = process.env.BUILDKITE_PARALLEL_JOB
|
||||
? parseInt(process.env.BUILDKITE_PARALLEL_JOB, 10)
|
||||
: 0;
|
||||
const chunkSize = Math.ceil(integrationsPaths.length / chunksTotal);
|
||||
|
||||
return _.chunk(integrationsPaths, chunkSize)[chunkIndex];
|
||||
const integrationsPathsForChunk: string[] = [];
|
||||
|
||||
for (let i = chunkIndex; i < integrationsPaths.length; i += chunksTotal) {
|
||||
integrationsPathsForChunk.push(integrationsPaths[i]);
|
||||
}
|
||||
|
||||
return integrationsPathsForChunk;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
"cypress:open": "TZ=UTC node ../security_solution/scripts/start_cypress_parallel open --spec './cypress/e2e/**/*.cy.ts' --config-file ./cypress/cypress.config.ts --ftr-config-file ../../../../../../x-pack/test/threat_intelligence_cypress/cli_config_parallel",
|
||||
"cypress:run": "yarn cypress:run:reporter --browser chrome --spec './cypress/e2e/**/*.cy.ts'; status=$?; yarn junit:merge && exit $status",
|
||||
"cypress:run:spec": "yarn cypress:run:reporter --browser chrome --spec ${SPEC_LIST:-'./cypress/e2e/**/*.cy.ts'}; status=$?; yarn junit:merge && exit $status",
|
||||
"cypress:run:cases": "yarn cypress:run:reporter --browser chrome --spec './cypress/e2e/cases/*.cy.ts' --ftr-config-file ../../../../../../x-pack/test/security_solution_cypress/cases_cli_config; status=$?; yarn junit:merge && exit $status",
|
||||
"cypress:run:cases": "yarn cypress:run:reporter --browser chrome --spec './cypress/e2e/cases/*.cy.ts' --ftr-config-file ../../../../../../x-pack/test/security_solution_cypress/cli_config; status=$?; yarn junit:merge && exit $status",
|
||||
"cypress:run:reporter": "TZ=UTC node ../security_solution/scripts/start_cypress_parallel run --config-file ./cypress/cypress.config.ts --ftr-config-file ../../../../../../x-pack/test/threat_intelligence_cypress/cli_config_parallel --reporter ../../../node_modules/cypress-multi-reporters --reporter-options configFile=./cypress/reporter_config.json",
|
||||
"cypress:run:respops": "yarn cypress:run:reporter --browser chrome --spec ./cypress/e2e/detection_alerts/*.cy.ts,./cypress/e2e/detection_rules/*.cy.ts,./cypress/e2e/exceptions/*.cy.ts --ftr-config-file ../../../../../../x-pack/test/security_solution_cypress/response_ops_cli_config; status=$?; yarn junit:merge && exit $status",
|
||||
"cypress:run:respops": "yarn cypress:run:reporter --browser chrome --spec ./cypress/e2e/detection_alerts/*.cy.ts,./cypress/e2e/detection_rules/*.cy.ts,./cypress/e2e/exceptions/*.cy.ts --ftr-config-file ../../../../../../x-pack/test/security_solution_cypress/cli_config; status=$?; yarn junit:merge && exit $status",
|
||||
"junit:merge": "../../../node_modules/.bin/mochawesome-merge ../../../target/kibana-threat-intelligence/cypress/results/mochawesome*.json > ../../../target/kibana-threat-intelligence/cypress/results/output.json && ../../../node_modules/.bin/marge ../../../target/kibana-threat-intelligence/cypress/results/output.json --reportDir ../../../target/kibana-threat-intelligence/cypress/results && mkdir -p ../../../target/junit && cp ../../../target/kibana-threat-intelligence/cypress/results/*.xml ../../../target/junit/"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
/*
|
||||
* 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 { FtrConfigProviderContext } from '@kbn/test';
|
||||
|
||||
import type { FtrProviderContext } from './runner';
|
||||
import { SecuritySolutionConfigurableCypressTestRunner } from './runner';
|
||||
|
||||
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
||||
const securitySolutionCypressConfig = await readConfigFile(require.resolve('./config.ts'));
|
||||
return {
|
||||
...securitySolutionCypressConfig.getAll(),
|
||||
|
||||
testRunner: (context: FtrProviderContext) =>
|
||||
SecuritySolutionConfigurableCypressTestRunner(context),
|
||||
};
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
/*
|
||||
* 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 { FtrConfigProviderContext } from '@kbn/test';
|
||||
|
||||
import type { FtrProviderContext } from './runner';
|
||||
import { SecuritySolutionConfigurableCypressTestRunner } from './runner';
|
||||
|
||||
// eslint-disable-next-line import/no-default-export
|
||||
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
||||
const securitySolutionCypressConfig = await readConfigFile(require.resolve('./config.ts'));
|
||||
return {
|
||||
...securitySolutionCypressConfig.getAll(),
|
||||
|
||||
testRunner: (context: FtrProviderContext) =>
|
||||
SecuritySolutionConfigurableCypressTestRunner(context),
|
||||
};
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
/*
|
||||
* 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 { FtrConfigProviderContext } from '@kbn/test';
|
||||
|
||||
import type { FtrProviderContext } from './runner';
|
||||
import { SecuritySolutionConfigurableCypressTestRunner } from './runner';
|
||||
|
||||
export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
||||
const securitySolutionCypressConfig = await readConfigFile(require.resolve('./config.ts'));
|
||||
return {
|
||||
...securitySolutionCypressConfig.getAll(),
|
||||
|
||||
testRunner: (context: FtrProviderContext) =>
|
||||
SecuritySolutionConfigurableCypressTestRunner(context),
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue