From a1437b5e729fd1fc48c0b677c7dc9e9ffa99bf2c Mon Sep 17 00:00:00 2001 From: Tomasz Ciecierski Date: Fri, 18 Oct 2024 08:20:04 +0200 Subject: [PATCH 1/4] unskip tests, update artifact version --- .../cypress/e2e/all/alerts_automated_action_results.cy.ts | 3 +-- x-pack/plugins/osquery/cypress/e2e/all/live_query.cy.ts | 3 +-- x-pack/plugins/osquery/cypress/e2e/all/live_query_run.cy.ts | 3 +-- .../plugins/osquery/cypress/e2e/all/packs_create_edit.cy.ts | 3 +-- x-pack/plugins/osquery/cypress/e2e/all/saved_queries.cy.ts | 4 +--- x-pack/test/osquery_cypress/artifact_manager.ts | 2 +- 6 files changed, 6 insertions(+), 12 deletions(-) diff --git a/x-pack/plugins/osquery/cypress/e2e/all/alerts_automated_action_results.cy.ts b/x-pack/plugins/osquery/cypress/e2e/all/alerts_automated_action_results.cy.ts index 31bcd68da19cd..4c7c9663b2d40 100644 --- a/x-pack/plugins/osquery/cypress/e2e/all/alerts_automated_action_results.cy.ts +++ b/x-pack/plugins/osquery/cypress/e2e/all/alerts_automated_action_results.cy.ts @@ -11,8 +11,7 @@ import { checkActionItemsInResults, loadRuleAlerts } from '../../tasks/live_quer const UUID_REGEX = '[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}'; -// Failing: See https://github.com/elastic/kibana/issues/178404 -describe.skip('Alert Flyout Automated Action Results', () => { +describe('Alert Flyout Automated Action Results', () => { let ruleId: string; before(() => { diff --git a/x-pack/plugins/osquery/cypress/e2e/all/live_query.cy.ts b/x-pack/plugins/osquery/cypress/e2e/all/live_query.cy.ts index cafc97cb646ea..6f551ad39b196 100644 --- a/x-pack/plugins/osquery/cypress/e2e/all/live_query.cy.ts +++ b/x-pack/plugins/osquery/cypress/e2e/all/live_query.cy.ts @@ -19,8 +19,7 @@ import { LIVE_QUERY_EDITOR } from '../../screens/live_query'; import { getAdvancedButton } from '../../screens/integrations'; import { ServerlessRoleName } from '../../support/roles'; -// Failing: See https://github.com/elastic/kibana/issues/171435 -describe.skip('ALL - Live Query', { tags: ['@ess', '@serverless'] }, () => { +describe('ALL - Live Query', { tags: ['@ess', '@serverless'] }, () => { beforeEach(() => { cy.login(ServerlessRoleName.SOC_MANAGER); navigateTo('/app/osquery'); diff --git a/x-pack/plugins/osquery/cypress/e2e/all/live_query_run.cy.ts b/x-pack/plugins/osquery/cypress/e2e/all/live_query_run.cy.ts index f0a19907d57d8..c74b253ae9d41 100644 --- a/x-pack/plugins/osquery/cypress/e2e/all/live_query_run.cy.ts +++ b/x-pack/plugins/osquery/cypress/e2e/all/live_query_run.cy.ts @@ -23,8 +23,7 @@ import { getAdvancedButton } from '../../screens/integrations'; import { loadSavedQuery, cleanupSavedQuery } from '../../tasks/api_fixtures'; import { ServerlessRoleName } from '../../support/roles'; -// FLAKY: https://github.com/elastic/kibana/issues/195458 -describe.skip('ALL - Live Query run custom and saved', { tags: ['@ess', '@serverless'] }, () => { +describe('ALL - Live Query run custom and saved', { tags: ['@ess', '@serverless'] }, () => { let savedQueryId: string; let savedQueryName: string; diff --git a/x-pack/plugins/osquery/cypress/e2e/all/packs_create_edit.cy.ts b/x-pack/plugins/osquery/cypress/e2e/all/packs_create_edit.cy.ts index 39a54d29d4025..dbed4e56f88a0 100644 --- a/x-pack/plugins/osquery/cypress/e2e/all/packs_create_edit.cy.ts +++ b/x-pack/plugins/osquery/cypress/e2e/all/packs_create_edit.cy.ts @@ -38,8 +38,7 @@ import { loadSavedQuery, cleanupSavedQuery, cleanupPack, loadPack } from '../../ import { request } from '../../tasks/common'; import { ServerlessRoleName } from '../../support/roles'; -// Failing: See https://github.com/elastic/kibana/issues/195463 -describe.skip('Packs - Create and Edit', { tags: ['@ess', '@serverless'] }, () => { +describe('Packs - Create and Edit', { tags: ['@ess', '@serverless'] }, () => { let savedQueryId: string; let savedQueryName: string; let nomappingSavedQueryId: string; diff --git a/x-pack/plugins/osquery/cypress/e2e/all/saved_queries.cy.ts b/x-pack/plugins/osquery/cypress/e2e/all/saved_queries.cy.ts index d74bd2483f746..56c0b478d9621 100644 --- a/x-pack/plugins/osquery/cypress/e2e/all/saved_queries.cy.ts +++ b/x-pack/plugins/osquery/cypress/e2e/all/saved_queries.cy.ts @@ -43,9 +43,7 @@ import { import { ServerlessRoleName } from '../../support/roles'; import { getAdvancedButton } from '../../screens/integrations'; -// Failing: See https://github.com/elastic/kibana/issues/195453 -// Failing: See https://github.com/elastic/kibana/issues/195453 -describe.skip('ALL - Saved queries', { tags: ['@ess', '@serverless'] }, () => { +describe('ALL - Saved queries', { tags: ['@ess', '@serverless'] }, () => { let caseId: string; before(() => { diff --git a/x-pack/test/osquery_cypress/artifact_manager.ts b/x-pack/test/osquery_cypress/artifact_manager.ts index 54b9a70d37aff..a78a37267ec5a 100644 --- a/x-pack/test/osquery_cypress/artifact_manager.ts +++ b/x-pack/test/osquery_cypress/artifact_manager.ts @@ -6,5 +6,5 @@ */ export async function getLatestVersion(): Promise { - return '8.11.0-SNAPSHOT'; + return '8.15.0-SNAPSHOT'; } From 409f23126e4ea2bcbacab419b68cbbb145d4e346 Mon Sep 17 00:00:00 2001 From: Tomasz Ciecierski Date: Mon, 21 Oct 2024 11:26:19 +0200 Subject: [PATCH 2/4] fix --- .../osquery/cypress/e2e/all/saved_queries.cy.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/x-pack/plugins/osquery/cypress/e2e/all/saved_queries.cy.ts b/x-pack/plugins/osquery/cypress/e2e/all/saved_queries.cy.ts index 56c0b478d9621..8076aab1c49cc 100644 --- a/x-pack/plugins/osquery/cypress/e2e/all/saved_queries.cy.ts +++ b/x-pack/plugins/osquery/cypress/e2e/all/saved_queries.cy.ts @@ -92,20 +92,18 @@ describe('ALL - Saved queries', { tags: ['@ess', '@serverless'] }, () => { cy.getBySel(RESULTS_TABLE_COLUMNS_BUTTON).should('have.text', 'Columns35'); cy.getBySel('dataGridColumnSelectorButton').click(); cy.get('[data-popover-open="true"]').should('be.visible'); - cy.getBySel('dataGridColumnSelectorToggleColumnVisibility-osquery.cmdline').click(); - cy.getBySel('dataGridColumnSelectorToggleColumnVisibility-osquery.cwd').click(); - cy.getBySel( - 'dataGridColumnSelectorToggleColumnVisibility-osquery.disk_bytes_written.number' - ).click(); + cy.getBySel('dataGridColumnSelectorColumnItem-osquery.cmdline').click(); + cy.getBySel('dataGridColumnSelectorColumnItem-osquery.cwd').click(); + cy.getBySel('dataGridColumnSelectorColumnItem-osquery.disk_bytes_written.number').click(); cy.getBySel('dataGridColumnSelectorButton').click(); cy.get('[data-popover-open="true"]').should('not.exist'); - cy.getBySel(RESULTS_TABLE_COLUMNS_BUTTON).should('have.text', 'Columns32/35'); + cy.getBySel(RESULTS_TABLE_COLUMNS_BUTTON).should('have.text', 'Columns35'); // change pagination cy.getBySel('pagination-button-next').click(); cy.getBySel('globalLoadingIndicator').should('not.exist'); cy.getBySel('pagination-button-next').click(); - cy.getBySel(RESULTS_TABLE_COLUMNS_BUTTON).should('have.text', 'Columns32/35'); + cy.getBySel(RESULTS_TABLE_COLUMNS_BUTTON).should('have.text', 'Columns35'); // enter fullscreen cy.getBySel(RESULTS_TABLE_BUTTON).trigger('mouseover'); @@ -116,7 +114,7 @@ describe('ALL - Saved queries', { tags: ['@ess', '@serverless'] }, () => { // sorting cy.getBySel('dataGridHeaderCellActionButton-osquery.egid').click({ force: true }); cy.contains(/Sort A-Z$/).click(); - cy.getBySel(RESULTS_TABLE_COLUMNS_BUTTON).should('have.text', 'Columns32/35'); + cy.getBySel(RESULTS_TABLE_COLUMNS_BUTTON).should('have.text', 'Columns35'); cy.getBySel(RESULTS_TABLE_BUTTON).trigger('mouseover'); cy.contains(/Enter fullscreen$/).should('exist'); From b8e7df0dcf2fccf6814c23fc31b88dfab977ed14 Mon Sep 17 00:00:00 2001 From: Tomasz Ciecierski Date: Mon, 21 Oct 2024 17:11:33 +0200 Subject: [PATCH 3/4] increase timeout --- x-pack/plugins/osquery/cypress/e2e/all/alerts_cases.cy.ts | 3 +-- .../security_solution_cypress/cypress/tasks/create_new_rule.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) 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 ca0692b310606..d84d3aa691d1e 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 @@ -84,8 +84,7 @@ describe('Alert Event Details - Cases', { tags: ['@ess', '@serverless'] }, () => }); }); - // FLAKY: https://github.com/elastic/kibana/issues/187182 - describe.skip('Case', () => { + describe('Case', () => { let caseId: string; beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/tasks/create_new_rule.ts b/x-pack/test/security_solution_cypress/cypress/tasks/create_new_rule.ts index 501dd0461dd44..e9822d1340a85 100644 --- a/x-pack/test/security_solution_cypress/cypress/tasks/create_new_rule.ts +++ b/x-pack/test/security_solution_cypress/cypress/tasks/create_new_rule.ts @@ -884,7 +884,7 @@ export const waitForAlertsToPopulate = (alertCountThreshold = 1) => { return alertCount >= alertCountThreshold; }); }, - { interval: 500, timeout: 12000 } + { interval: 500, timeout: 30000 } ); waitForAlerts(); }; From f2cf035fddf9cb926affe205febc798e7cd89acb Mon Sep 17 00:00:00 2001 From: Tomasz Ciecierski Date: Mon, 21 Oct 2024 19:00:19 +0200 Subject: [PATCH 4/4] move intiializeDataViews to before each --- .../plugins/osquery/cypress/e2e/all/alerts_linked_apps.cy.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 92b174583dd1d..2b04a99bd4f9c 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 @@ -26,10 +26,8 @@ describe( () => { let ruleId: string; let ruleName: string; - before(() => { - initializeDataViews(); - }); beforeEach(() => { + initializeDataViews(); loadRule().then((data) => { ruleId = data.id; ruleName = data.name;