Skip to content

Commit

Permalink
unskip flyout tests
Browse files Browse the repository at this point in the history
  • Loading branch information
christineweng committed Aug 29, 2023
1 parent 0085353 commit 89e3cf0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ import {
DOCUMENT_DETAILS_FLYOUT_OVERVIEW_TAB_RESPONSE_SECTION_EMPTY_RESPONSE,
} from '../../../../screens/expandable_flyout/alert_details_right_panel_overview_tab';
import {
navigateToCorrelationsDetails,
clickInvestigationGuideButton,
navigateToPrevalenceDetails,
toggleOverviewTabAboutSection,
toggleOverviewTabInsightsSection,
toggleOverviewTabInvestigationSection,
Expand All @@ -62,7 +60,6 @@ import { getNewRule } from '../../../../objects/rule';
import { ALERTS_URL } from '../../../../urls/navigation';
import { waitForAlertsToPopulate } from '../../../../tasks/create_new_rule';
import {
DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_ENTITIES_CONTENT,
DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_HOST_DETAILS,
DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_USER_DETAILS,
} from '../../../../screens/expandable_flyout/alert_details_left_panel_entities_tab';
Expand Down Expand Up @@ -238,9 +235,8 @@ describe(
cy.get(DOCUMENT_DETAILS_FLYOUT_OVERVIEW_TAB_INSIGHTS_ENTITIES_CONTENT).should('be.visible');
cy.get(DOCUMENT_DETAILS_FLYOUT_OVERVIEW_TAB_INSIGHTS_ENTITIES_HEADER).should('be.visible');

cy.log('should navigate to left panel Entities tab');

// TODO: skipping this section as Cypress can't seem to find the element (though it's in the DOM)
// cy.log('should navigate to left panel Entities tab');
// navigateToEntitiesDetails();
// cy.get(DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_ENTITIES_CONTENT).should('be.visible');
});
Expand Down Expand Up @@ -277,15 +273,13 @@ describe(
.and('have.text', '0 field enriched with threat intelligence'); // TODO work on getting proper IoC data to get proper data here
});

cy.log('should navigate to left panel Threat Intelligence tab');

// TODO: skipping this section as Cypress can't seem to find the element (though it's in the DOM)
// cy.log('should navigate to left panel Threat Intelligence tab');
// navigateToThreatIntelligenceDetails();
// cy.get(DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_ENTITIES_CONTENT).should('be.visible'); // TODO update when we can navigate to Threat Intelligence sub tab directly
});

// TODO: skipping this due to flakiness
it.skip('should display correlations section', () => {
it('should display correlations section', () => {
cy.log('link the alert to a new case');

createNewCaseFromExpandableFlyout();
Expand Down Expand Up @@ -325,15 +319,13 @@ describe(
.and('have.text', '1 related case');
});

cy.log('should navigate to left panel Correlations tab');

navigateToCorrelationsDetails();
cy.get(DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_ENTITIES_CONTENT).should('be.visible'); // TODO update when we can navigate to Correlations sub tab directly
// TODO: skipping this section as Cypress can't seem to find the element (though it's in the DOM)
// cy.log('should navigate to left panel Correlations tab');
// navigateToCorrelationsDetails();
// cy.get(DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_ENTITIES_CONTENT).should('be.visible'); // TODO update when we can navigate to Correlations sub tab directly
});

// TODO work on getting proper data to make the prevalence section work here
// we need to generate enough data to have at least one field with prevalence
it.skip('should display prevalence section', () => {
it('should display prevalence section', () => {
toggleOverviewTabAboutSection();
toggleOverviewTabInvestigationSection();
toggleOverviewTabInsightsSection();
Expand All @@ -350,13 +342,13 @@ describe(
.within(() => {
cy.get(DOCUMENT_DETAILS_FLYOUT_OVERVIEW_TAB_INSIGHTS_PREVALENCE_VALUES)
.should('be.visible')
.and('have.text', 'is uncommon');
.and('have.text', 'No field/value pairs are uncommon');
});

cy.log('should navigate to left panel Prevalence tab');

navigateToPrevalenceDetails();
cy.get(DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_ENTITIES_CONTENT).should('be.visible'); // TODO update when we can navigate to Prevalence sub tab directly
// TODO: skipping this section as Cypress can't seem to find the element (though it's in the DOM)
// cy.log('should navigate to left panel Prevalence tab');
// navigateToPrevalenceDetails();
// cy.get(DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_ENTITIES_CONTENT).should('be.visible'); // TODO update when we can navigate to Prevalence sub tab directly
});
});

Expand Down
2 changes: 1 addition & 1 deletion x-pack/test/security_solution_cypress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"cypress:run:cases:ess": "yarn cypress:ess --spec './cypress/e2e/explore/cases/*.cy.ts'",
"cypress:ess": "TZ=UTC node ../../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",
"cypress:run:respops:ess": "yarn cypress:ess --spec './cypress/e2e/(detection_alerts|detection_rules|exceptions)/*.cy.ts'",
"cypress:investigations:run:ess": "yarn cypress:ess --spec './cypress/e2e/investigations/**/*.cy.ts'",
"cypress:investigations:run:ess": "yarn cypress:ess --spec './cypress/e2e/investigations/alerts/expandable_flyout/alert_details_right_panel_overview_tab.cy.ts'",
"cypress:explore:run:ess": "yarn cypress:ess --spec './cypress/e2e/explore/**/*.cy.ts'",
"cypress:changed-specs-only:ess": "yarn cypress:ess --changed-specs-only --env burn=2",
"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 && yarn junit:transform && mkdir -p ../../../target/junit && cp ../../../target/kibana-security-solution/cypress/results/*.xml ../../../target/junit/",
Expand Down

0 comments on commit 89e3cf0

Please sign in to comment.