Skip to content

Commit c2e4dda

Browse files
committed
[SIEM] Upgrades cypress to version 4.0.2 (#58400)
* upgrades cypress to version 4.0.2 * fixes failing tests
1 parent 46da04c commit c2e4dda

File tree

7 files changed

+21
-6
lines changed

7 files changed

+21
-6
lines changed

x-pack/legacy/plugins/siem/cypress/integration/timeline_search_or_filter.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ describe('timeline search or filter KQL bar', () => {
2424

2525
cy.get(SERVER_SIDE_EVENT_COUNT)
2626
.invoke('text')
27-
.should('be.above', 0);
27+
.then(strCount => {
28+
const intCount = +strCount;
29+
cy.wrap(intCount).should('be.above', 0);
30+
});
2831
});
2932
});

x-pack/legacy/plugins/siem/cypress/integration/url_state.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,10 @@ describe('url state', () => {
236236

237237
cy.get(SERVER_SIDE_EVENT_COUNT)
238238
.invoke('text')
239-
.should('be.above', 0);
239+
.then(strCount => {
240+
const intCount = +strCount;
241+
cy.wrap(intCount).should('be.above', 0);
242+
});
240243

241244
const bestTimelineName = 'The Best Timeline';
242245
addNameToTimeline(bestTimelineName);

x-pack/legacy/plugins/siem/cypress/tasks/hosts/authentications.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
*/
66

77
import { AUTHENTICATIONS_TABLE } from '../../screens/hosts/authentications';
8+
import { REFRESH_BUTTON } from '../../screens/siem_header';
89

910
export const waitForAuthenticationsToBeLoaded = () => {
1011
cy.get(AUTHENTICATIONS_TABLE).should('exist');
12+
cy.get(REFRESH_BUTTON)
13+
.invoke('text')
14+
.should('not.equal', 'Updating');
1115
};

x-pack/legacy/plugins/siem/cypress/tasks/hosts/uncommon_processes.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
*/
66

77
import { UNCOMMON_PROCESSES_TABLE } from '../../screens/hosts/uncommon_processes';
8+
import { REFRESH_BUTTON } from '../../screens/siem_header';
89

910
export const waitForUncommonProcessesToBeLoaded = () => {
1011
cy.get(UNCOMMON_PROCESSES_TABLE).should('exist');
12+
cy.get(REFRESH_BUTTON)
13+
.invoke('text')
14+
.should('not.equal', 'Updating');
1115
};

x-pack/legacy/plugins/siem/cypress/tasks/timeline.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ export const populateTimeline = () => {
6565
executeTimelineKQL(hostExistsQuery);
6666
cy.get(SERVER_SIDE_EVENT_COUNT)
6767
.invoke('text')
68-
.should('be.above', 0);
68+
.then(strCount => {
69+
const intCount = +strCount;
70+
cy.wrap(intCount).should('be.above', 0);
71+
});
6972
};
7073

7174
export const uncheckTimestampToggleField = () => {

x-pack/legacy/plugins/siem/public/components/fields_browser/header.test.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@
66

77
import { mount } from 'enzyme';
88
import React from 'react';
9-
109
import { mockBrowserFields } from '../../containers/source/mock';
1110
import { TestProviders } from '../../mock';
1211
import { defaultHeaders } from '../timeline/body/column_headers/default_headers';
13-
1412
import { Header } from './header';
1513

1614
const timelineId = 'test';

x-pack/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
"cheerio": "0.22.0",
118118
"commander": "3.0.2",
119119
"copy-webpack-plugin": "^5.0.4",
120-
"cypress": "^3.6.1",
120+
"cypress": "^4.0.2",
121121
"cypress-multi-reporters": "^1.2.3",
122122
"enzyme": "^3.11.0",
123123
"enzyme-adapter-react-16": "^1.15.2",

0 commit comments

Comments
 (0)