diff --git a/x-pack/plugins/security_solution/cypress/e2e/header/search_bar.cy.ts b/x-pack/plugins/security_solution/cypress/e2e/header/search_bar.cy.ts index 0d40fdcaadd96..e09dac46c04e7 100644 --- a/x-pack/plugins/security_solution/cypress/e2e/header/search_bar.cy.ts +++ b/x-pack/plugins/security_solution/cypress/e2e/header/search_bar.cy.ts @@ -42,7 +42,7 @@ describe('SearchBar', () => { it('auto suggests fields from the data view and auto completes available field values', () => { openKqlQueryBar(); cy.get(AUTO_SUGGEST_AGENT_NAME).should('be.visible'); - fillKqlQueryBar(); + fillKqlQueryBar(`host.name:`); cy.get(AUTO_SUGGEST_HOST_NAME_VALUE).should('be.visible'); }); }); diff --git a/x-pack/plugins/security_solution/cypress/tasks/search_bar.ts b/x-pack/plugins/security_solution/cypress/tasks/search_bar.ts index 39155e8c9e914..fb5e978befdda 100644 --- a/x-pack/plugins/security_solution/cypress/tasks/search_bar.ts +++ b/x-pack/plugins/security_solution/cypress/tasks/search_bar.ts @@ -30,9 +30,9 @@ export const openKqlQueryBar = () => { cy.get(GLOBAL_KQL_INPUT).click(); }; -export const fillKqlQueryBar = () => { +export const fillKqlQueryBar = (query: string) => { cy.get(GLOBAL_KQL_INPUT).should('be.visible'); - cy.get(GLOBAL_KQL_INPUT).type(`host.name:`); + cy.get(GLOBAL_KQL_INPUT).type(query); }; export const fillAddFilterForm = ({ key, value, operator }: SearchBarFilter) => {