Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
szwarckonrad committed Apr 24, 2023
1 parent 7b8fe2a commit 12b16d2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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();
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,7 @@ export const checkEndpointListForIsolatedHosts = (expectIsolated = true): void =
});
});
};

export const checkEndpointListForOnlyUnIsolatedHosts = () =>
checkEndpointListForIsolatedHosts(false);
export const checkEndpointListForOnlyIsolatedHosts = () => checkEndpointListForIsolatedHosts(true);
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {
Expand Down

0 comments on commit 12b16d2

Please sign in to comment.