Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SecuritySolution] Fix flaky search or filter tests #173367

Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ import {
showDataProviderQueryBuilder,
} from '../../../tasks/timeline';
import { waitForTimelinesPanelToBeLoaded } from '../../../tasks/timelines';
import { deleteTimelines } from '../../../tasks/api_calls/common';

import { hostsUrl, TIMELINES_URL } from '../../../urls/navigation';

describe('Timeline search and filters', { tags: ['@ess', '@serverless'] }, () => {
describe('timeline search or filter KQL bar', () => {
beforeEach(() => {
login();
deleteTimelines();
visitWithTimeRange(hostsUrl('allHosts'));
});

PhilippeOberti marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -53,18 +55,17 @@ describe('Timeline search and filters', { tags: ['@ess', '@serverless'] }, () =>
});
PhilippeOberti marked this conversation as resolved.
Show resolved Hide resolved
});

// FLAKY: https://github.com/elastic/kibana/issues/169882
describe.skip('Update kqlMode for timeline', () => {
describe('Update kqlMode for timeline', () => {
beforeEach(() => {
login();
deleteTimelines();
visit(TIMELINES_URL);
waitForTimelinesPanelToBeLoaded();
openTimelineUsingToggle();
cy.intercept('PATCH', '/api/timeline').as('update');
cy.get(LOADING_INDICATOR).should('not.exist');
showDataProviderQueryBuilder();
cy.get(TIMELINE_SEARCH_OR_FILTER).click();
PhilippeOberti marked this conversation as resolved.
Show resolved Hide resolved
cy.get(TIMELINE_SEARCH_OR_FILTER).should('exist');
});

it('should be able to update timeline kqlMode with filter', () => {
PhilippeOberti marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
PhilippeOberti marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,6 @@ export const openTimelineFromOpenTimelineModal = (timelineName: string) => {

export const showDataProviderQueryBuilder = () => {
cy.get(TOGGLE_DATA_PROVIDER_BTN).should('have.attr', 'aria-pressed', 'false');
cy.get(TOGGLE_DATA_PROVIDER_BTN).trigger('click');
cy.get(TOGGLE_DATA_PROVIDER_BTN).click();
cy.get(TOGGLE_DATA_PROVIDER_BTN).should('have.attr', 'aria-pressed', 'true');
};