mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[Asset inventory] Add initial cypress test (#207647)
## Summary This PR introduces initial cypress test and also a basic test was configured to test for the presence of the Asset Inventory page when the Feature Flag `assetInventoryUXEnabled` is set.
This commit is contained in:
parent
dcdffff0e1
commit
c03313a57c
7 changed files with 47 additions and 1 deletions
1
.github/CODEOWNERS
vendored
1
.github/CODEOWNERS
vendored
|
@ -2546,6 +2546,7 @@ x-pack/test_serverless/api_integration/test_suites/security/cloud_security_postu
|
|||
## CSP e2e tests
|
||||
x-pack/test/security_solution_cypress/cypress/e2e/cloud_security_posture/misconfiguration_contextual_flyout.cy.ts @elastic/kibana-cloud-security-posture
|
||||
x-pack/test/security_solution_cypress/cypress/e2e/cloud_security_posture/vulnerabilities_contextual_flyout.cy.ts @elastic/kibana-cloud-security-posture
|
||||
x-pack/test/security_solution_cypress/cypress/e2e/asset_inventory @elastic/kibana-cloud-security-posture
|
||||
|
||||
# Security Solution onboarding tour
|
||||
/x-pack/solutions/security/plugins/security_solution/public/common/components/guided_onboarding @elastic/security-threat-hunting-explore
|
||||
|
|
|
@ -374,7 +374,7 @@ const AllAssets = ({
|
|||
loading={loadingState === DataLoadingState.loading}
|
||||
/>
|
||||
<EuiPageTemplate.Section>
|
||||
<EuiTitle size="l">
|
||||
<EuiTitle size="l" data-test-subj="all-assets-title">
|
||||
<h1>
|
||||
<FormattedMessage
|
||||
id="xpack.securitySolution.assetInventory.allAssets"
|
||||
|
|
|
@ -46,6 +46,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
|
|||
'--xpack.ruleRegistry.unsafe.legacyMultiTenancy.enabled=true',
|
||||
`--xpack.securitySolution.enableExperimental=${JSON.stringify([
|
||||
'alertSuppressionForSequenceEqlRuleEnabled',
|
||||
'assetInventoryUXEnabled',
|
||||
])}`,
|
||||
// mock cloud to enable the guided onboarding tour in e2e tests
|
||||
'--xpack.cloud.id=test',
|
||||
|
|
|
@ -153,6 +153,7 @@ If you belong to one of the teams listed in the table, please add new e2e specs
|
|||
| `e2e/detection_response/detection_engine` | Detection Engine |
|
||||
| `e2e/ai_assistant` | AI Assistant |
|
||||
| `e2e/entity_analytics` | Entity Analytics |
|
||||
| `e2e/asset_inventory` | Cloud Security Posture |
|
||||
|
||||
|
||||
### fixtures/
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* 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 { getDataTestSubjectSelector } from '../../helpers/common';
|
||||
import { login } from '../../tasks/login';
|
||||
import { visit } from '../../tasks/navigation';
|
||||
import { ASSET_INVENTORY_URL } from '../../urls/navigation';
|
||||
|
||||
const ALL_ASSETS_TITLE = getDataTestSubjectSelector('all-assets-title');
|
||||
|
||||
describe(
|
||||
'Asset Inventory page',
|
||||
{
|
||||
env: {
|
||||
ftrConfig: {
|
||||
kbnServerArgs: [
|
||||
`--xpack.securitySolution.enableExperimental=${JSON.stringify([
|
||||
'assetInventoryUXEnabled',
|
||||
])}`,
|
||||
],
|
||||
},
|
||||
},
|
||||
tags: ['@ess'],
|
||||
},
|
||||
() => {
|
||||
beforeEach(() => {
|
||||
login();
|
||||
visit(ASSET_INVENTORY_URL);
|
||||
});
|
||||
|
||||
it('should display All assets title', () => {
|
||||
cy.get(ALL_ASSETS_TITLE).should('be.visible');
|
||||
});
|
||||
}
|
||||
);
|
|
@ -82,3 +82,6 @@ export const FLEET_URL = '/app/fleet';
|
|||
|
||||
// Entity Analytics
|
||||
export const ENTITY_ANALYTICS_DASHBOARD_URL = '/app/security/entity_analytics';
|
||||
|
||||
// Asset Inventory
|
||||
export const ASSET_INVENTORY_URL = '/app/security/asset_inventory';
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
"scripts": {
|
||||
"cypress": "NODE_OPTIONS=--openssl-legacy-provider ../../../node_modules/.bin/cypress",
|
||||
"cypress:open:ess": "TZ=UTC NODE_OPTIONS=--openssl-legacy-provider node ../../solutions/security/plugins/security_solution/scripts/start_cypress_parallel open --spec './cypress/e2e/**/*.cy.ts' --config-file ../../test/security_solution_cypress/cypress/cypress.config.ts --ftr-config-file ../../test/security_solution_cypress/cli_config",
|
||||
"cypress:asset_inventory:run:ess": "yarn cypress:ess --spec './cypress/e2e/asset_inventory/**/*.cy.ts'",
|
||||
"cypress:entity_analytics:run:ess": "yarn cypress:ess --spec './cypress/e2e/entity_analytics/**/*.cy.ts'",
|
||||
"cypress:run:cases:ess": "yarn cypress:ess --spec './cypress/e2e/explore/cases/*.cy.ts'",
|
||||
"cypress:ess": "TZ=UTC NODE_OPTIONS=--openssl-legacy-provider node ../../solutions/security/plugins/security_solution/scripts/start_cypress_parallel run --config-file ../../test/security_solution_cypress/cypress/cypress_ci.config.ts --ftr-config-file ../../test/security_solution_cypress/cli_config",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue