Skip to content

Commit dbc274b

Browse files
patrykkopycinskijbudz
authored andcommitted
[Security Solution] Fix Overview cypress tests (#82761)
1 parent 97164a7 commit dbc274b

3 files changed

Lines changed: 4 additions & 9 deletions

File tree

x-pack/plugins/security_solution/cypress/integration/overview.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { OVERVIEW_URL } from '../urls/navigation';
1313

1414
describe('Overview Page', () => {
1515
it('Host stats render with correct values', () => {
16-
cy.stubSearchStrategyApi('overviewHostQuery', 'overview_search_strategy');
16+
cy.stubSearchStrategyApi('overview_search_strategy');
1717
loginAndWaitForPage(OVERVIEW_URL);
1818
expandHostStats();
1919

@@ -23,7 +23,7 @@ describe('Overview Page', () => {
2323
});
2424

2525
it('Network stats render with correct values', () => {
26-
cy.stubSearchStrategyApi('overviewNetworkQuery', 'overview_search_strategy');
26+
cy.stubSearchStrategyApi('overview_search_strategy');
2727
loginAndWaitForPage(OVERVIEW_URL);
2828
expandNetworkStats();
2929

x-pack/plugins/security_solution/cypress/support/commands.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ Cypress.Commands.add('stubSecurityApi', function (dataFileName) {
4040
});
4141

4242
Cypress.Commands.add('stubSearchStrategyApi', function (
43-
queryId,
4443
dataFileName,
4544
searchStrategyName = 'securitySolutionSearchStrategy'
4645
) {
@@ -49,7 +48,7 @@ Cypress.Commands.add('stubSearchStrategyApi', function (
4948
});
5049
cy.server();
5150
cy.fixture(dataFileName).as(`${dataFileName}JSON`);
52-
cy.route('POST', `internal/search/${searchStrategyName}/${queryId}`, `@${dataFileName}JSON`);
51+
cy.route('POST', `internal/search/${searchStrategyName}`, `@${dataFileName}JSON`);
5352
});
5453

5554
Cypress.Commands.add(

x-pack/plugins/security_solution/cypress/support/index.d.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@ declare namespace Cypress {
88
interface Chainable<Subject> {
99
promisify(): Promise<Subject>;
1010
stubSecurityApi(dataFileName: string): Chainable<Subject>;
11-
stubSearchStrategyApi(
12-
queryId: string,
13-
dataFileName: string,
14-
searchStrategyName?: string
15-
): Chainable<Subject>;
11+
stubSearchStrategyApi(dataFileName: string, searchStrategyName?: string): Chainable<Subject>;
1612
attachFile(fileName: string, fileType?: string): Chainable<JQuery>;
1713
waitUntil(
1814
fn: (subject: Subject) => boolean | Chainable<boolean>,

0 commit comments

Comments
 (0)