From 3b401f3c1613ddc5b6ab3124f589306fef323245 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Tue, 22 Oct 2024 07:31:21 +1100 Subject: [PATCH] [8.x] [EDR Workflows] Unskip osquery tests (#196793) (#197122) # Backport This will backport the following commits from `main` to `8.x`: - [[EDR Workflows] Unskip osquery tests (#196793)](https://github.com/elastic/kibana/pull/196793) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Tomasz Ciecierski --- .../cypress/e2e/all/alerts_linked_apps.cy.ts | 4 +--- .../osquery/cypress/e2e/all/saved_queries.cy.ts | 14 ++++++-------- x-pack/test/osquery_cypress/artifact_manager.ts | 2 +- .../cypress/tasks/create_new_rule.ts | 2 +- 4 files changed, 9 insertions(+), 13 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; 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'); 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'; } 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(); };