Skip to content

Commit

Permalink
fix(NA): eslint on x-pack/test/security_solution_cypress/cypress/e2e/…
Browse files Browse the repository at this point in the history
…investigations/alerts/expandable_flyout/alert_details_left_panel_correlations_tab.cy.ts
  • Loading branch information
mistic committed Dec 4, 2023
1 parent b87196e commit 29c6126
Showing 1 changed file with 67 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,75 +34,82 @@ import { visit } from '../../../../tasks/navigation';
import { ALERTS_URL } from '../../../../urls/navigation';

// FLAKY: https://github.com/elastic/kibana/issues/170822
describe.skip('Expandable flyout left panel correlations', { tags: ['@ess', '@serverless'] }, () => {
beforeEach(() => {
login();
createRule(getNewRule());
visit(ALERTS_URL);
waitForAlertsToPopulate();
expandFirstAlertExpandableFlyout();
expandDocumentDetailsExpandableFlyoutLeftSection();
createNewCaseFromExpandableFlyout();
openInsightsTab();
openCorrelationsTab();
});
describe.skip(
'Expandable flyout left panel correlations',
{ tags: ['@ess', '@serverless'] },
() => {
beforeEach(() => {
login();
createRule(getNewRule());
visit(ALERTS_URL);
waitForAlertsToPopulate();
expandFirstAlertExpandableFlyout();
expandDocumentDetailsExpandableFlyoutLeftSection();
createNewCaseFromExpandableFlyout();
openInsightsTab();
openCorrelationsTab();
});

it('should render correlations details correctly', () => {
cy.get(DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB)
.should('have.text', 'Insights')
.and('have.class', 'euiTab-isSelected');
it('should render correlations details correctly', () => {
cy.get(DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB)
.should('have.text', 'Insights')
.and('have.class', 'euiTab-isSelected');

cy.get(DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_CORRELATIONS_BUTTON)
.should('have.text', 'Correlations')
.and('have.class', 'euiButtonGroupButton-isSelected');
cy.get(DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_CORRELATIONS_BUTTON)
.should('have.text', 'Correlations')
.and('have.class', 'euiButtonGroupButton-isSelected');

// cy.log('suppressed alerts');
// cy.log('suppressed alerts');

// TODO get proper data to test suppressed alerts
// cy.get(CORRELATIONS_SUPPRESSED_ALERTS_TITLE).scrollIntoView();
// cy.get(CORRELATIONS_SUPPRESSED_ALERTS_TITLE)
// .should('be.visible')
// .and('contain.text', '1 suppressed alert');
// cy.get(CORRELATIONS_SUPPRESSED_ALERTS_INVESTIGATE_IN_TIMELINE_BUTTON).should('be.visible');
// TODO get proper data to test suppressed alerts
// cy.get(CORRELATIONS_SUPPRESSED_ALERTS_TITLE).scrollIntoView();
// cy.get(CORRELATIONS_SUPPRESSED_ALERTS_TITLE)
// .should('be.visible')
// .and('contain.text', '1 suppressed alert');
// cy.get(CORRELATIONS_SUPPRESSED_ALERTS_INVESTIGATE_IN_TIMELINE_BUTTON).should('be.visible');

cy.log('related cases');
cy.log('related cases');

cy.get(CORRELATIONS_CASES_SECTION_TITLE).should('contain.text', '1 related case');
cy.get(CORRELATIONS_CASES_SECTION_TABLE)
.should('contain.text', 'case')
.and('contain.text', 'open');
cy.get(CORRELATIONS_CASES_SECTION_TITLE).should('contain.text', '1 related case');
cy.get(CORRELATIONS_CASES_SECTION_TABLE)
.should('contain.text', 'case')
.and('contain.text', 'open');

cy.log('related alerts by source event');
cy.log('related alerts by source event');

cy.get(CORRELATIONS_SOURCE_SECTION_TITLE).should(
'contain.text',
'1 alert related by source event'
);
cy.get(CORRELATIONS_SOURCE_SECTION_TABLE).should('exist');
cy.get(CORRELATIONS_SOURCE_SECTION_INVESTIGATE_IN_TIMELINE_BUTTON).should(
'contain.text',
'Investigate in timeline'
);
cy.get(CORRELATIONS_SOURCE_SECTION_TITLE).should(
'contain.text',
'1 alert related by source event'
);
cy.get(CORRELATIONS_SOURCE_SECTION_TABLE).should('exist');
cy.get(CORRELATIONS_SOURCE_SECTION_INVESTIGATE_IN_TIMELINE_BUTTON).should(
'contain.text',
'Investigate in timeline'
);

cy.log('related alerts by session');
cy.log('related alerts by session');

cy.get(CORRELATIONS_SESSION_SECTION_TITLE).should('contain.text', '1 alert related by session');
cy.get(CORRELATIONS_SESSION_SECTION_TABLE).should('exist');
cy.get(CORRELATIONS_SESSION_SECTION_INVESTIGATE_IN_TIMELINE_BUTTON).should(
'contain.text',
'Investigate in timeline'
);
cy.get(CORRELATIONS_SESSION_SECTION_TITLE).should(
'contain.text',
'1 alert related by session'
);
cy.get(CORRELATIONS_SESSION_SECTION_TABLE).should('exist');
cy.get(CORRELATIONS_SESSION_SECTION_INVESTIGATE_IN_TIMELINE_BUTTON).should(
'contain.text',
'Investigate in timeline'
);

cy.log('related alerts by ancestry');
cy.log('related alerts by ancestry');

cy.get(CORRELATIONS_ANCESTRY_SECTION_TITLE).should(
'contain.text',
'1 alert related by ancestry'
);
cy.get(CORRELATIONS_ANCESTRY_SECTION_TABLE).should('exist');
cy.get(CORRELATIONS_ANCESTRY_SECTION_INVESTIGATE_IN_TIMELINE_BUTTON).should(
'contain.text',
'Investigate in timeline'
);
});
});
cy.get(CORRELATIONS_ANCESTRY_SECTION_TITLE).should(
'contain.text',
'1 alert related by ancestry'
);
cy.get(CORRELATIONS_ANCESTRY_SECTION_TABLE).should('exist');
cy.get(CORRELATIONS_ANCESTRY_SECTION_INVESTIGATE_IN_TIMELINE_BUTTON).should(
'contain.text',
'Investigate in timeline'
);
});
}
);

0 comments on commit 29c6126

Please sign in to comment.