diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/endpoint/response_console.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/endpoint/response_console.cy.ts index c5ec89778de62..ddfcd2aaab4b5 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/endpoint/response_console.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/endpoint/response_console.cy.ts @@ -20,7 +20,11 @@ import { getEndpointIntegrationVersion, reassignAgentPolicy, } from '../../tasks/fleet'; -import { checkEndpointListForIsolatedHosts, createAgentPolicyTask } from '../../tasks/isolate'; +import { + checkEndpointListForOnlyIsolatedHosts, + checkEndpointListForOnlyUnIsolatedHosts, + createAgentPolicyTask, +} from '../../tasks/isolate'; import { login } from '../../tasks/login'; import { ENDPOINT_VM_NAME } from '../../tasks/common'; @@ -58,22 +62,23 @@ describe('Response console', () => { it('should isolate host from response console', () => { waitForEndpointListPageToBeLoaded(endpointHostname); - checkEndpointListForIsolatedHosts(false); + checkEndpointListForOnlyUnIsolatedHosts(); openResponseConsoleFromEndpointList(); performCommandInputChecks('isolate'); submitCommand(); waitForCommandToBeExecuted(); + checkEndpointListForOnlyIsolatedHosts(); }); it('should release host from response console', () => { waitForEndpointListPageToBeLoaded(endpointHostname); - checkEndpointListForIsolatedHosts(true); + checkEndpointListForOnlyIsolatedHosts(); openResponseConsoleFromEndpointList(); performCommandInputChecks('release'); submitCommand(); waitForCommandToBeExecuted(); waitForEndpointListPageToBeLoaded(endpointHostname); - checkEndpointListForIsolatedHosts(false); + checkEndpointListForOnlyUnIsolatedHosts(); }); }); 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 4644faaca2abf..48ff1bc052390 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 @@ -139,3 +139,7 @@ export const checkEndpointListForIsolatedHosts = (expectIsolated = true): void = }); }); }; + +export const checkEndpointListForOnlyUnIsolatedHosts = () => + checkEndpointListForIsolatedHosts(false); +export const checkEndpointListForOnlyIsolatedHosts = () => checkEndpointListForIsolatedHosts(true); diff --git a/x-pack/plugins/security_solution/public/management/cypress/tasks/response_console.ts b/x-pack/plugins/security_solution/public/management/cypress/tasks/response_console.ts index e345020e88bb4..8449524c0bec9 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/tasks/response_console.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/tasks/response_console.ts @@ -19,7 +19,7 @@ export const openResponseConsoleFromEndpointList = () => { }; export const inputConsoleCommand = (command: string) => { - cy.getByTestSubj('endpointResponseActionsConsole-inputCapture').click().type(`${command}`); + cy.getByTestSubj('endpointResponseActionsConsole-inputCapture').click().type(command); }; export const clearConsoleCommandInput = () => {