Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
szwarckonrad committed Apr 21, 2023
1 parent b3a7460 commit b5b6941
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* 2.0.
*/

import { getEndpointListPath } from '../../../common/routing';
import {
interceptActionRequests,
isolateHostWithComment,
Expand All @@ -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';
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down

0 comments on commit b5b6941

Please sign in to comment.