Skip to content

Commit

Permalink
fixes failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MadameSheema committed Feb 24, 2020
1 parent d381455 commit 21032c8
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ describe('timeline search or filter KQL bar', () => {

cy.get(SERVER_SIDE_EVENT_COUNT)
.invoke('text')
.should('be.above', 0);
.then(strCount => {
const intCount = +strCount;
cy.wrap(intCount).should('be.above', 0);
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,10 @@ describe('url state', () => {

cy.get(SERVER_SIDE_EVENT_COUNT)
.invoke('text')
.should('be.above', 0);
.then(strCount => {
const intCount = +strCount;
cy.wrap(intCount).should('be.above', 0);
});

const bestTimelineName = 'The Best Timeline';
addNameToTimeline(bestTimelineName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
*/

import { AUTHENTICATIONS_TABLE } from '../../screens/hosts/authentications';
import { REFRESH_BUTTON } from '../../screens/siem_header';

export const waitForAuthenticationsToBeLoaded = () => {
cy.get(AUTHENTICATIONS_TABLE).should('exist');
cy.get(REFRESH_BUTTON)
.invoke('text')
.should('not.equal', 'Updating');
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
*/

import { UNCOMMON_PROCESSES_TABLE } from '../../screens/hosts/uncommon_processes';
import { REFRESH_BUTTON } from '../../screens/siem_header';

export const waitForUncommonProcessesToBeLoaded = () => {
cy.get(UNCOMMON_PROCESSES_TABLE).should('exist');
cy.get(REFRESH_BUTTON)
.invoke('text')
.should('not.equal', 'Updating');
};
5 changes: 4 additions & 1 deletion x-pack/legacy/plugins/siem/cypress/tasks/timeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ export const populateTimeline = () => {
executeTimelineKQL(hostExistsQuery);
cy.get(SERVER_SIDE_EVENT_COUNT)
.invoke('text')
.should('be.above', 0);
.then(strCount => {
const intCount = +strCount;
cy.wrap(intCount).should('be.above', 0);
});
};

export const uncheckTimestampToggleField = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@

import { mount } from 'enzyme';
import React from 'react';

import { mockBrowserFields } from '../../containers/source/mock';
import { TestProviders } from '../../mock';
import { defaultHeaders } from '../timeline/body/column_headers/default_headers';

import { Header } from './header';

const timelineId = 'test';
Expand Down

0 comments on commit 21032c8

Please sign in to comment.