diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/header/search_bar.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/header/search_bar.cy.ts index 7600c8edd9bbd..203e966eef9ad 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/header/search_bar.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/header/search_bar.cy.ts @@ -23,8 +23,7 @@ import { getHostIpFilter } from '../../objects/filter'; import { hostsUrl } from '../../urls/navigation'; import { waitForAllHostsToBeLoaded } from '../../tasks/hosts/all_hosts'; -// FLAKY: https://github.com/elastic/kibana/issues/165637 -describe('SearchBar', { tags: ['@ess', '@serverless', '@brokenInServerless'] }, () => { +describe('SearchBar', { tags: ['@ess', '@serverless'] }, () => { beforeEach(() => { login(); visit(hostsUrl('allHosts')); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/detection_page_filters.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/detection_page_filters.cy.ts index 0b0169da945b9..9231b73843b1c 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/detection_page_filters.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/detection_page_filters.cy.ts @@ -361,6 +361,7 @@ describe.skip(`Detections : Page Filters`, { tags: ['@ess', '@brokenInServerless openAddFilterPopover(); fillAddFilterForm({ key: 'kibana.alert.workflow_status', + operator: 'is', value: 'invalid', }); waitForPageFilters(); diff --git a/x-pack/test/security_solution_cypress/cypress/objects/filter.ts b/x-pack/test/security_solution_cypress/cypress/objects/filter.ts index 2ab271b795ca4..22df1394ff35c 100644 --- a/x-pack/test/security_solution_cypress/cypress/objects/filter.ts +++ b/x-pack/test/security_solution_cypress/cypress/objects/filter.ts @@ -7,11 +7,12 @@ export interface SearchBarFilter { key: string; + operator: 'is' | 'is not' | 'is one of' | 'is not one of' | 'exists' | 'does not exist'; value?: string; - operator?: 'is' | 'is not' | 'is one of' | 'is not one of' | 'exists' | 'does not exist'; } export const getHostIpFilter = (): SearchBarFilter => ({ key: 'host.ip', + operator: 'is', value: '1.1.1.1', }); diff --git a/x-pack/test/security_solution_cypress/cypress/screens/search_bar.ts b/x-pack/test/security_solution_cypress/cypress/screens/search_bar.ts index 4517f1e3b2632..36b3accb3e5a6 100644 --- a/x-pack/test/security_solution_cypress/cypress/screens/search_bar.ts +++ b/x-pack/test/security_solution_cypress/cypress/screens/search_bar.ts @@ -26,9 +26,6 @@ export const ADD_FILTER_FORM_FIELD_OPTION = (value: string) => export const ADD_FILTER_FORM_OPERATOR_FIELD = '[data-test-subj="filterOperatorList"] input[data-test-subj="comboBoxSearchInput"]'; -export const ADD_FILTER_FORM_OPERATOR_OPTION_IS = - '[data-test-subj="comboBoxOptionsList filterOperatorList-optionsList"] button[title="is"]'; - export const ADD_FILTER_FORM_FILTER_VALUE_INPUT = '[data-test-subj="filterParams"] input'; export const ADD_FILTER_FORM_SAVE_BUTTON = '[data-test-subj="saveFilter"]'; diff --git a/x-pack/test/security_solution_cypress/cypress/tasks/search_bar.ts b/x-pack/test/security_solution_cypress/cypress/tasks/search_bar.ts index 2d33ff2244571..3a4355cad2e7e 100644 --- a/x-pack/test/security_solution_cypress/cypress/tasks/search_bar.ts +++ b/x-pack/test/security_solution_cypress/cypress/tasks/search_bar.ts @@ -13,7 +13,6 @@ import { GLOBAL_SEARCH_BAR_SUBMIT_BUTTON, ADD_FILTER_FORM_SAVE_BUTTON, ADD_FILTER_FORM_FIELD_INPUT, - ADD_FILTER_FORM_OPERATOR_OPTION_IS, ADD_FILTER_FORM_OPERATOR_FIELD, ADD_FILTER_FORM_FILTER_VALUE_INPUT, GLOBAL_KQL_INPUT, @@ -53,19 +52,17 @@ export const removeKqlFilter = () => { }); }; -export const fillAddFilterForm = ({ key, value, operator }: SearchBarFilter) => { +export const fillAddFilterForm = ({ key, operator, value }: SearchBarFilter) => { cy.get(ADD_FILTER_FORM_FIELD_INPUT).should('exist'); cy.get(ADD_FILTER_FORM_FIELD_INPUT).should('be.visible'); cy.get(ADD_FILTER_FORM_FIELD_INPUT).type(`${key}{downarrow}{enter}`); - if (!operator) { - cy.get(ADD_FILTER_FORM_OPERATOR_FIELD).click(); - cy.get(ADD_FILTER_FORM_OPERATOR_OPTION_IS).click(); - } else { - cy.get(ADD_FILTER_FORM_OPERATOR_FIELD).type(`${operator}{enter}`); - } + + cy.get(ADD_FILTER_FORM_OPERATOR_FIELD).type(`${operator}{downarrow}{enter}`); + if (value) { cy.get(ADD_FILTER_FORM_FILTER_VALUE_INPUT).type(value); } + cy.get(ADD_FILTER_FORM_SAVE_BUTTON).click(); cy.get(ADD_FILTER_FORM_SAVE_BUTTON).should('not.exist'); };