Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion redisinsight/ui/src/pages/instance/styles.module.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.mainComponent {
height: calc(100% - 29px) !important;
height: calc(100% - 26px) !important;
}

.resizableButton {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ const EnablementAreaWrapper = React.memo(({ isMinimized, setIsMinimized, scriptE
className={cx(styles.areaWrapper, { [styles.minimized]: isMinimized })}
onClick={() => isMinimized && setIsMinimized(false)}
direction="column"
responsive={false}
gutterSize="none"
data-testid="enablement-area-container"
>
Expand Down
6 changes: 4 additions & 2 deletions tests/e2e/pageObjects/cli-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export class CliPage {
cliOutputResponseFail: Selector
cliArea: Selector
cliCollapseButton: Selector
collapseCliHelperButton: Selector
cliHelperSearch: Selector
cliHelperOutputTitles: Selector
filterGroupTypeButton: Selector
Expand All @@ -34,6 +33,8 @@ export class CliPage {
cliCommandExecuted: Selector
cliReadMoreJSONCommandDocumentation: Selector
cliReadMoreRediSearchCommandDocumentation: Selector
expandCommandHelperButton: Selector
closeCommandHelperButton: Selector

constructor() {
//-------------------------------------------------------------------------------------------
Expand All @@ -45,7 +46,8 @@ export class CliPage {
//BUTTONS
this.cliExpandButton = Selector('[data-testid=expand-cli]');
this.cliCollapseButton = Selector('[data-testid=collapse-cli]');
this.collapseCliHelperButton = Selector('[data-testid=collapse-cli-helper]');
this.expandCommandHelperButton = Selector('[data-testid=expand-command-helper]');
this.closeCommandHelperButton = Selector('[data-testid=close-command-helper]');
this.filterGroupTypeButton = Selector('[data-testid=select-filter-group-type]');
this.filterOptionGroupType = Selector('[data-test-subj^=filter-option-group-type-]');
this.readMoreButton = Selector('[data-testid=read-more]');
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/rte/redis-enterprise/db.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "testdb",
"name": "test-re-standalone",
"type": "redis",
"memory_size": 1073741824,
"port": 12000
Expand Down
32 changes: 17 additions & 15 deletions tests/e2e/tests/critical-path/cli/cli-command-helper.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ fixture `CLI Command helper`
})
test('Verify that user can see relevant search results in Command Helper per every entered symbol', async t => {
await myRedisDatabasePage.clickOnDBByName(ossStandaloneConfig.databaseName);
//Open CLI
await t.click(cliPage.cliExpandButton);
//Open Command Helper
await t.click(cliPage.expandCommandHelperButton);
//Start search from 1 symbol
await t.typeText(cliPage.cliHelperSearch, 's');
//Verify that we found commands
Expand All @@ -47,23 +47,24 @@ test('Verify that user can see relevant search results in Command Helper per eve
});
test('Verify that when user clears the input in the Search of CLI Helper (via x icon), he can see the default screen with proper the text', async t => {
await myRedisDatabasePage.clickOnDBByName(ossStandaloneConfig.databaseName);
//Open CLI
await t.click(cliPage.cliExpandButton);
//Open Command Helper
await t.click(cliPage.expandCommandHelperButton);
//Verify default text
await t.expect(cliPage.cliHelperText.textContent).eql(defaultHelperText, 'Default text for CLI Helper is shown');
//Search any command
await t.typeText(cliPage.cliHelperSearch, 'SET');
await t.expect(cliPage.cliHelperOutputTitles.count).gt(0, 'List of commands were found');
//Clear search input
const clearButton = await cliPage.cliHelper.find('[aria-label="Clear input"]')
const clearButton = cliPage.cliHelper.find('[aria-label="Clear input"]');
await t.click(clearButton);
//Verify default text after clear
await t.expect(cliPage.cliHelperText.textContent).eql(defaultHelperText, 'Default text for CLI Helper is shown');
});
test('Verify that when user enters command in CLI, Helper displays additional info about the command', async t => {
await myRedisDatabasePage.clickOnDBByName(ossStandaloneConfig.databaseName);
//Open CLI
//Open CLI and Helper
await t.click(cliPage.cliExpandButton);
await t.click(cliPage.expandCommandHelperButton);
//Enter command into CLI
await t.typeText(cliPage.cliCommandInput, COMMAND_APPEND);
//Verify details of the command
Expand All @@ -74,8 +75,9 @@ test('Verify that when user enters command in CLI, Helper displays additional in
test('Verify that Command helper cleared when user runs the command in CLI', async t => {
const searchText = 'sa';
await myRedisDatabasePage.clickOnDBByName(ossStandaloneConfig.databaseName);
//Open CLI
//Open CLI and Helper
await t.click(cliPage.cliExpandButton);
await t.click(cliPage.expandCommandHelperButton);
//Select group from list
await cliPage.selectFilterGroupType(COMMAND_GROUP_SET);
//Type text in search
Expand All @@ -88,8 +90,8 @@ test('Verify that Command helper cleared when user runs the command in CLI', asy
});
test('Verify that user can unselect the command filtered to remove filters', async t => {
await myRedisDatabasePage.clickOnDBByName(ossStandaloneConfig.databaseName);
//Open CLI
await t.click(cliPage.cliExpandButton);
//Open Command Helper
await t.click(cliPage.expandCommandHelperButton);
//Select one command from list
await cliPage.selectFilterGroupType(COMMAND_GROUP_SET);
await t.expect(cliPage.cliHelperOutputTitles.count).gt(0, 'List of commands were found');
Expand All @@ -103,8 +105,8 @@ test('Verify that user can unselect the command filtered to remove filters', asy
test('Verify that when user has used search and apply filters, search results include only commands from the filter group applied', async t => {
const searchText = 'sa';
await myRedisDatabasePage.clickOnDBByName(ossStandaloneConfig.databaseName);
//Open CLI
await t.click(cliPage.cliExpandButton);
//Open Command Helper
await t.click(cliPage.expandCommandHelperButton);
//Select group from list
await cliPage.selectFilterGroupType(COMMAND_GROUP_SET);
//Type text in search
Expand All @@ -117,8 +119,8 @@ test('Verify that when user has used search and apply filters, search results in
test('Verify that user can type TS. in Command helper and see commands from RedisTimeSeries commands.json', async t => {
const commandForSearch = 'TS.';
await myRedisDatabasePage.clickOnDBByName(ossStandaloneConfig.databaseName);
//Open CLI
await t.click(cliPage.cliExpandButton);
//Open Command Helper
await t.click(cliPage.expandCommandHelperButton);
//Select group from list and remeber commands
await cliPage.selectFilterGroupType(COMMAND_GROUP_TIMESERIES);
const commandsFilterCount = await cliPage.cliHelperOutputTitles.count;
Expand All @@ -139,8 +141,8 @@ test('Verify that user can type TS. in Command helper and see commands from Redi
test('Verify that user can type GRAPH. in Command helper and see auto-suggestions from RedisGraph commands.json', async t => {
const commandForSearch = 'GRAPH.';
await myRedisDatabasePage.clickOnDBByName(ossStandaloneConfig.databaseName);
//Open CLI
await t.click(cliPage.cliExpandButton);
//Open Command Helper
await t.click(cliPage.expandCommandHelperButton);
//Select group from list and remeber commands
await cliPage.selectFilterGroupType(COMMAND_GROUP_GRAPH);
const commandsFilterCount = await cliPage.cliHelperOutputTitles.count;
Expand Down
16 changes: 8 additions & 8 deletions tests/e2e/tests/regression/cli/cli-command-helper.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ const getPageUrl = ClientFunction(() => window.location.href);
test('Verify that user can see in Command helper and click on new group "JSON", can choose it and see list of commands in the group', async t => {
const commandForCheck = 'JSON.SET';
await myRedisDatabasePage.clickOnDBByName(ossStandaloneConfig.databaseName);
//Open CLI
await t.click(cliPage.cliExpandButton);
//Open Command Helper
await t.click(cliPage.expandCommandHelperButton);
//Select one command from the list
await cliPage.selectFilterGroupType(COMMAND_GROUP_JSON);
await t.click(cliPage.cliHelperOutputTitles.withExactText(commandForCheck));
Expand All @@ -51,8 +51,8 @@ test('Verify that user can see in Command helper and click on new group "JSON",
test('Verify that user can see in Command helper and click on new group "Search", can choose it and see list of commands in the group', async t => {
const commandForCheck = 'FT.EXPLAIN';
await myRedisDatabasePage.clickOnDBByName(ossStandaloneConfig.databaseName);
//Open CLI
await t.click(cliPage.cliExpandButton);
//Open Command Helper
await t.click(cliPage.expandCommandHelperButton);
//Select one command from the list
await cliPage.selectFilterGroupType(COMMAND_GROUP_SEARCH);
await t.click(cliPage.cliHelperOutputTitles.withExactText(commandForCheck));
Expand All @@ -68,8 +68,8 @@ test('Verify that user can see in Command helper and click on new group "Search"
test('Verify that user can see HyperLogLog title in Command Helper for this command group', async t => {
const commandForCheck = 'PFCOUNT';
await myRedisDatabasePage.clickOnDBByName(ossStandaloneConfig.databaseName);
//Open CLI
await t.click(cliPage.cliExpandButton);
//Open Command Helper
await t.click(cliPage.expandCommandHelperButton);
//Select one command from the list
await cliPage.selectFilterGroupType(COMMAND_GROUP_HyperLogLog);
await t.click(cliPage.cliHelperOutputTitles.withExactText(commandForCheck));
Expand Down Expand Up @@ -106,8 +106,8 @@ test('Verify that user can see all separated groups for AI json file (model, ten
'/#aitensorset'
];
await myRedisDatabasePage.clickOnDBByName(ossStandaloneConfig.databaseName);
//Open CLI
await t.click(cliPage.cliExpandButton);
//Open Command Helper
await t.click(cliPage.expandCommandHelperButton);
let i = 0;
while (i <= 3) {
//Select one group from the list
Expand Down
34 changes: 14 additions & 20 deletions tests/e2e/tests/smoke/cli/cli-command-helper.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,20 @@ fixture `CLI Command helper`
await t.expect(addRedisDatabasePage.addDatabaseButton.exists).ok('The add redis database view', { timeout: 20000 });
await addNewStandaloneDatabase(ossStandaloneConfig);
})
test('Verify that user can see Command helper opened by default when he opens CLI', async t => {
await myRedisDatabasePage.clickOnDBByName(ossStandaloneConfig.databaseName);
//Open CLI
await t.click(cliPage.cliExpandButton);
//Verify that the Command helper opened by default
await t.expect(cliPage.cliHelperText.textContent).eql('Enter any command in CLI or use search to see detailed information.', 'Command helper');
});
test('Verify that user can close Command helper', async t => {
await myRedisDatabasePage.clickOnDBByName(ossStandaloneConfig.databaseName);
//Open CLI
await t.click(cliPage.cliExpandButton);
//Open Command Helper
await t.click(cliPage.expandCommandHelperButton);
//Close Command helper
await t.click(cliPage.collapseCliHelperButton);
await t.click(cliPage.closeCommandHelperButton);
//Verify that the Command helper is closed
await t.expect(cliPage.cliHelperText.visible).eql(false, 'Command helper');
});
test('Verify that user can search per command in Command Helper and see relevant results', async t => {
const commandForSearch = 'ADD';
await myRedisDatabasePage.clickOnDBByName(ossStandaloneConfig.databaseName);
//Open CLI
await t.click(cliPage.cliExpandButton);
//Open Command Helper
await t.click(cliPage.expandCommandHelperButton);
//Search per command
await t.typeText(cliPage.cliHelperSearch, commandForSearch);
//Verify results in the output
Expand All @@ -59,8 +52,8 @@ test('Verify that user can search per command in Command Helper and see relevant
test('Verify that user can select one of the commands from the list of commands described in the Groups table', async t => {
const commandForCheck = 'SADD';
await myRedisDatabasePage.clickOnDBByName(ossStandaloneConfig.databaseName);
//Open CLI
await t.click(cliPage.cliExpandButton);
//Open Command Helper
await t.click(cliPage.expandCommandHelperButton);
//Select one command from list
await cliPage.selectFilterGroupType(COMMAND_GROUP_SET);
await t.click(cliPage.cliHelperOutputTitles.withExactText(commandForCheck));
Expand All @@ -70,8 +63,8 @@ test('Verify that user can select one of the commands from the list of commands
test('Verify that user can click on any of searched commands in Command Helper and see details of the command', async t => {
const commandForSearch = 'Ap';
await myRedisDatabasePage.clickOnDBByName(ossStandaloneConfig.databaseName);
//Open CLI
await t.click(cliPage.cliExpandButton);
//Open Command Helper
await t.click(cliPage.expandCommandHelperButton);
//Select one command from list of searched commands
await t.typeText(cliPage.cliHelperSearch, commandForSearch);
await t.click(cliPage.cliHelperOutputTitles.withExactText(COMMAND_APPEND));
Expand All @@ -84,24 +77,25 @@ test('Verify that when user enters command, he can see Command Name, Complexity,
const commandForSearch = 'pop';
const commandForCheck = 'LPOP';
await myRedisDatabasePage.clickOnDBByName(ossStandaloneConfig.databaseName);
//Open CLI
await t.click(cliPage.cliExpandButton);
//Open Command Helper
await t.click(cliPage.expandCommandHelperButton);
//Select one command from list of searched commands
await t.typeText(cliPage.cliHelperSearch, commandForSearch);
await t.click(cliPage.cliHelperOutputTitles.withExactText(commandForCheck));
//Verify details of the command
await t.expect(cliPage.cliHelperTitleArgs.innerText).eql('LPOP key [count]', 'Command Name');
await t.expect(cliPage.cliHelperComplexity.innerText).eql('Complexity:\nO(N) where N is the number of elements returned', 'Complexity');
await t.expect(cliPage.cliHelperArguments.innerText).eql('Arguments:\nkey\nRequired\n[count]\nOptional', 'Arguments');
await t.expect(cliPage.cliHelperArguments.innerText).eql('Arguments:\nRequired\nkey\nOptional\n[count]', 'Arguments');
await t.expect(cliPage.cliHelperSummary.innerText).contains('Remove and get the first elements in a list', 'Command Summary');
await t.expect(cliPage.cliHelperTitle.innerText).contains('LIST', 'Command Group');
await t.expect(cliPage.readMoreButton.exists).ok('Read more button');
});
test('Verify that user can see that command is autocompleted in CLI with required arguments', async t => {
const command = 'HDEL';
await myRedisDatabasePage.clickOnDBByName(ossStandaloneConfig.databaseName);
//Open CLI
//Open CLI and Helper
await t.click(cliPage.cliExpandButton);
await t.click(cliPage.expandCommandHelperButton);
//Search for the command and remember arguments
await t.typeText(cliPage.cliHelperSearch, command);
await t.click(cliPage.cliHelperOutputTitles.withExactText(command));
Expand Down