diff --git a/x-pack/plugins/security_solution/common/endpoint/index_data.ts b/x-pack/plugins/security_solution/common/endpoint/index_data.ts index 8241c1f0f1e10..db5039e5a72f0 100644 --- a/x-pack/plugins/security_solution/common/endpoint/index_data.ts +++ b/x-pack/plugins/security_solution/common/endpoint/index_data.ts @@ -105,7 +105,7 @@ export async function indexHostsAndAlerts( } for (let i = 0; i < numHosts; i++) { - const generator = new DocGenerator(random, undefined); + const generator = new DocGenerator(random); const indexedHosts = await indexEndpointHostDocs({ numDocs, client, diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/mocked_data/isolate.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/mocked_data/isolate.cy.ts index c06a839bd7d6f..579c0cab8c540 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/mocked_data/isolate.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/mocked_data/isolate.cy.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { getEndpointListPath } from '../../../common/routing'; import { interceptActionRequests, isolateHostWithComment, @@ -18,7 +19,7 @@ import type { ActionDetails } from '../../../../../common/endpoint/types'; import { closeAllToasts } from '../../tasks/close_all_toasts'; import type { ReturnTypeFromChainable } from '../../types'; import { addAlertsToCase } from '../../tasks/add_alerts_to_case'; -import { APP_CASES_PATH } from '../../../../../common/constants'; +import { APP_ALERTS_PATH, APP_CASES_PATH, APP_PATH } from '../../../../../common/constants'; import { login } from '../../tasks/login'; import { indexNewCase } from '../../tasks/index_new_case'; import { indexEndpointHosts } from '../../tasks/index_endpoint_hosts'; @@ -64,7 +65,7 @@ describe('Isolate command', () => { login(); }); it('should allow filtering endpoint by Isolated status', () => { - cy.visit('/app/security/administration/endpoints'); + cy.visit(APP_PATH + getEndpointListPath({ name: 'endpointList' })); closeAllToasts(); cy.getByTestSubj('adminSearchBar') .click() @@ -125,7 +126,7 @@ describe('Isolate command', () => { let isolateRequestResponse: ActionDetails; let releaseRequestResponse: ActionDetails; - cy.visit('/app/security/alerts'); + cy.visit(APP_ALERTS_PATH); closeAllToasts(); cy.getByTestSubj('alertsTable').within(() => { diff --git a/x-pack/plugins/security_solution/public/management/cypress/tasks/isolate.ts b/x-pack/plugins/security_solution/public/management/cypress/tasks/isolate.ts index e85b87e88fa8d..85cb005ae5e73 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/tasks/isolate.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/tasks/isolate.ts @@ -7,11 +7,12 @@ import type { ActionDetails } from '../../../../common/endpoint/types'; +const API_ENDPOINT_ACTION_PATH = '/api/endpoint/action/*'; export const interceptActionRequests = ( cb: (responseBody: ActionDetails) => void, alias: string ) => { - cy.intercept('POST', '/api/endpoint/action/*', (req) => { + cy.intercept('POST', API_ENDPOINT_ACTION_PATH, (req) => { req.continue((res) => { const { body: { action, data },