[Security Solution][Endpoint] Rename Responder cls command to clear (#137131)

This commit is contained in:
Paul Tavares 2022-07-26 08:51:56 -04:00 committed by GitHub
parent 4d1da83d93
commit fd1e7ed600
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -219,7 +219,7 @@ export const CommandList = memo<CommandListProps>(({ commands, display = 'defaul
const getFilteredCommands = useCallback(
(commandsByGroup): CommandDefinition[] =>
commandsByGroup.filter(
(current: CommandDefinition) => current.name !== 'help' && current.name !== 'cls'
(current: CommandDefinition) => current.name !== 'help' && current.name !== 'clear'
),
[]
);

View file

@ -48,14 +48,14 @@ describe('When a Console command is entered by the user', () => {
});
});
it('should clear the command output history when `cls` is entered', async () => {
it('should clear the command output history when `clear` is entered', async () => {
render();
enterCommand('help');
enterCommand('help');
expect(renderResult.getByTestId('test-historyOutput').childElementCount).toBe(2);
enterCommand('cls');
enterCommand('clear');
expect(renderResult.getByTestId('test-historyOutput').childElementCount).toBe(0);
});

View file

@ -45,7 +45,7 @@ export const getBuiltinCommands = (): CommandDefinition[] => {
helpCommandPosition: 1,
},
{
name: 'cls',
name: 'clear',
about: i18n.translate('xpack.securitySolution.console.builtInCommands.clearAbout', {
defaultMessage: 'Clear console screen',
}),