diff --git a/x-pack/plugins/osquery/cypress/e2e/all/alerts_cases.cy.ts b/x-pack/plugins/osquery/cypress/e2e/all/alerts_cases.cy.ts index c4a570ad277b4..f898886506fd0 100644 --- a/x-pack/plugins/osquery/cypress/e2e/all/alerts_cases.cy.ts +++ b/x-pack/plugins/osquery/cypress/e2e/all/alerts_cases.cy.ts @@ -23,11 +23,13 @@ import { submitQuery, viewRecentCaseAndCheckResults, } from '../../tasks/live_query'; -import { generateRandomStringName, interceptCaseId } from '../../tasks/integrations'; +import { + closeAlertsStepTourIfVisible, + generateRandomStringName, + interceptCaseId, +} from '../../tasks/integrations'; -// FLAKY: https://github.com/elastic/kibana/issues/170960 -// Failing: See https://github.com/elastic/kibana/issues/170960 -describe.skip('Alert Event Details - Cases', { tags: ['@ess', '@serverless'] }, () => { +describe('Alert Event Details - Cases', { tags: ['@ess', '@serverless'] }, () => { let ruleId: string; let packId: string; let packName: string; @@ -68,6 +70,7 @@ describe.skip('Alert Event Details - Cases', { tags: ['@ess', '@serverless'] }, it('runs osquery against alert and creates a new case', () => { const [caseName, caseDescription] = generateRandomStringName(2); cy.getBySel('expand-event').first().click(); + closeAlertsStepTourIfVisible(); cy.getBySel('take-action-dropdown-btn').click(); cy.getBySel('osquery-action-item').click(); cy.contains(/^\d+ agen(t|ts) selected/); @@ -103,6 +106,7 @@ describe.skip('Alert Event Details - Cases', { tags: ['@ess', '@serverless'] }, it('sees osquery results from last action and add to a case', () => { cy.getBySel('expand-event').first().click(); + closeAlertsStepTourIfVisible(); cy.getBySel('securitySolutionFlyoutResponseSectionHeader').click(); cy.getBySel('securitySolutionFlyoutResponseButton').click(); cy.getBySel('responseActionsViewWrapper').should('exist'); diff --git a/x-pack/plugins/osquery/cypress/e2e/all/alerts_linked_apps.cy.ts b/x-pack/plugins/osquery/cypress/e2e/all/alerts_linked_apps.cy.ts index 5cb29315e59a2..45921be4cbc2e 100644 --- a/x-pack/plugins/osquery/cypress/e2e/all/alerts_linked_apps.cy.ts +++ b/x-pack/plugins/osquery/cypress/e2e/all/alerts_linked_apps.cy.ts @@ -15,12 +15,14 @@ import { selectAllAgents, submitQuery, } from '../../tasks/live_query'; -import { closeModalIfVisible, closeToastIfVisible } from '../../tasks/integrations'; +import { + closeAlertsStepTourIfVisible, + closeModalIfVisible, + closeToastIfVisible, +} from '../../tasks/integrations'; import { RESULTS_TABLE, RESULTS_TABLE_BUTTON } from '../../screens/live_query'; -// FLAKY: https://github.com/elastic/kibana/issues/180852 -// Failing: See https://github.com/elastic/kibana/issues/180852 -describe.skip( +describe( 'Alert Event Details', { tags: ['@ess', '@serverless'], @@ -71,6 +73,7 @@ describe.skip( it('should be able to run live query and add to timeline', () => { const TIMELINE_NAME = 'Untitled timeline'; cy.getBySel('expand-event').first().click(); + closeAlertsStepTourIfVisible(); cy.getBySel('take-action-dropdown-btn').click(); cy.getBySel('osquery-action-item').click(); cy.contains('1 agent selected.'); diff --git a/x-pack/plugins/osquery/cypress/e2e/all/alerts_multiple_agents.cy.ts b/x-pack/plugins/osquery/cypress/e2e/all/alerts_multiple_agents.cy.ts index 7b644b8269a9c..f8241c52bda28 100644 --- a/x-pack/plugins/osquery/cypress/e2e/all/alerts_multiple_agents.cy.ts +++ b/x-pack/plugins/osquery/cypress/e2e/all/alerts_multiple_agents.cy.ts @@ -14,9 +14,9 @@ import { takeOsqueryActionWithParams, } from '../../tasks/live_query'; import { OSQUERY_FLYOUT_BODY_EDITOR } from '../../screens/live_query'; +import { closeAlertsStepTourIfVisible } from '../../tasks/integrations'; -// Failing: See https://github.com/elastic/kibana/issues/180851 -describe.skip( +describe( 'Alert Event Details - dynamic params', { tags: ['@ess', '@serverless'], @@ -43,6 +43,7 @@ describe.skip( it('should substitute parameters in investigation guide', () => { cy.getBySel('expand-event').first().click(); + closeAlertsStepTourIfVisible(); cy.getBySel('securitySolutionFlyoutInvestigationGuideButton').click(); // Flakes at times if the button is only clicked once cy.contains('Get processes').should('be.visible').dblclick({ force: true }); diff --git a/x-pack/plugins/osquery/cypress/e2e/roles/alert_test.cy.ts b/x-pack/plugins/osquery/cypress/e2e/roles/alert_test.cy.ts index caeb174884cad..5ca5775247caf 100644 --- a/x-pack/plugins/osquery/cypress/e2e/roles/alert_test.cy.ts +++ b/x-pack/plugins/osquery/cypress/e2e/roles/alert_test.cy.ts @@ -9,10 +9,9 @@ import { initializeDataViews } from '../../tasks/login'; import { checkResults, clickRuleName, submitQuery } from '../../tasks/live_query'; import { loadRule, cleanupRule } from '../../tasks/api_fixtures'; import { ServerlessRoleName } from '../../support/roles'; +import { closeAlertsStepTourIfVisible } from '../../tasks/integrations'; -// FLAKY: https://github.com/elastic/kibana/issues/180853 -// Failing: See https://github.com/elastic/kibana/issues/180853 -describe.skip('Alert Test', { tags: ['@ess'] }, () => { +describe('Alert Test', { tags: ['@ess'] }, () => { let ruleName: string; let ruleId: string; @@ -31,6 +30,7 @@ describe.skip('Alert Test', { tags: ['@ess'] }, () => { cy.visit('/app/security/rules'); clickRuleName(ruleName); cy.getBySel('expand-event').first().click({ force: true }); + closeAlertsStepTourIfVisible(); cy.wait(500); cy.getBySel('securitySolutionFlyoutInvestigationGuideButton').click(); diff --git a/x-pack/plugins/osquery/cypress/screens/integrations.ts b/x-pack/plugins/osquery/cypress/screens/integrations.ts index 5c3b7408e3047..250bce8d3f131 100644 --- a/x-pack/plugins/osquery/cypress/screens/integrations.ts +++ b/x-pack/plugins/osquery/cypress/screens/integrations.ts @@ -18,6 +18,10 @@ export const CONFIRM_MODAL_BTN_SEL = `[data-test-subj=${CONFIRM_MODAL_BTN}]`; export const TOAST_CLOSE_BTN = 'toastCloseButton'; export const TOAST_CLOSE_BTN_SEL = `[data-test-subj=${TOAST_CLOSE_BTN}]`; +export const SECURITY_SOLUTION_FLYOUT_TOUR = 'securitySolutionFlyoutTour-1'; + +export const SECURITY_SOLUTION_FLYOUT_TOUR_SEL = `[data-test-subj=${SECURITY_SOLUTION_FLYOUT_TOUR}]`; + export const SETTINGS_TAB = 'tab-settings'; export const POLICIES_TAB = 'tab-policies'; diff --git a/x-pack/plugins/osquery/cypress/tasks/integrations.ts b/x-pack/plugins/osquery/cypress/tasks/integrations.ts index e4c38854a5faf..e87b9228ad7ef 100644 --- a/x-pack/plugins/osquery/cypress/tasks/integrations.ts +++ b/x-pack/plugins/osquery/cypress/tasks/integrations.ts @@ -16,6 +16,7 @@ import { DATA_COLLECTION_SETUP_STEP, DATE_PICKER_ABSOLUTE_TAB, DATE_PICKER_ABSOLUTE_TAB_SEL, + SECURITY_SOLUTION_FLYOUT_TOUR_SEL, TOAST_CLOSE_BTN, TOAST_CLOSE_BTN_SEL, } from '../screens/integrations'; @@ -135,6 +136,16 @@ export function closeToastIfVisible() { }); } +export function closeAlertsStepTourIfVisible() { + cy.get(SECURITY_SOLUTION_FLYOUT_TOUR_SEL).then(($el) => { + if ($el.length > 0) { + cy.wrap($el).within(() => { + cy.contains('Exit').click(); + }); + } + }); +} + export const deleteIntegrations = async (integrationName: string) => { const ids: string[] = []; cy.contains(integrationName)