Skip to content

Commit

Permalink
fixes failing timeline test (#113394)
Browse files Browse the repository at this point in the history
  • Loading branch information
MadameSheema committed Sep 29, 2021
1 parent c76c40a commit 781fdf9
Showing 1 changed file with 7 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ import {
NOTES_TEXT,
PIN_EVENT,
SERVER_SIDE_EVENT_COUNT,
TIMELINE_DESCRIPTION,
TIMELINE_FILTER,
TIMELINE_FLYOUT_WRAPPER,
TIMELINE_QUERY,
TIMELINE_PANEL,
TIMELINE_TAB_CONTENT_EQL,
TIMELINE_TAB_CONTENT_GRAPHS_NOTES,
Expand Down Expand Up @@ -124,19 +126,11 @@ describe('Create a timeline from a template', () => {
cy.intercept('/api/timeline').as('timeline');

clickingOnCreateTimelineFormTemplateBtn();
cy.wait('@timeline', { timeout: 100000 }).then(({ request }) => {
if (request.body && request.body.timeline) {
expect(request.body.timeline).to.haveOwnProperty(
'description',
getTimeline().description
);
expect(request.body.timeline.kqlQuery.filterQuery.kuery).to.haveOwnProperty(
'expression',
getTimeline().query
);
cy.get(TIMELINE_FLYOUT_WRAPPER).should('have.css', 'visibility', 'visible');
}
});
cy.wait('@timeline', { timeout: 100000 });

cy.get(TIMELINE_FLYOUT_WRAPPER).should('have.css', 'visibility', 'visible');
cy.get(TIMELINE_DESCRIPTION).should('have.text', getTimeline().description);
cy.get(TIMELINE_QUERY).should('have.text', getTimeline().query);
});
});
});

0 comments on commit 781fdf9

Please sign in to comment.