Skip to content

Commit 0a161b1

Browse files
authored
Merge pull request #1917 from RedisInsight/e2e/feature/RI-4149_e2e-updates
updates for tests for 4149
2 parents 74ba17f + 3a57cdf commit 0a161b1

File tree

4 files changed

+11
-13
lines changed

4 files changed

+11
-13
lines changed

tests/e2e/tests/critical-path/cli/cli-critical.e2e.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ test
9292
test
9393
.meta({ rte: rte.standalone })('Verify that when user enters in CLI RediSearch/JSON commands (FT.CREATE, FT.DROPINDEX/JSON.GET, JSON.DEL), he can see hints with arguments', async t => {
9494
const commandHints = [
95-
'index [data_type] [prefix] [filter] [default_lang] [lang_attribute] [default_score] [score_attribute] [payload_attribute] [maxtextfields] [seconds] [nooffsets] [nohl] [nofields] [nofreqs] [stopwords] [skipinitialscan] schema field [field ...]',
96-
'index [delete docs]',
97-
'key [indent] [newline] [space] [path [path ...]]',
95+
'index [ON <HASH | JSON>] [PREFIX count prefix [prefix ...]] [FILTER filter] [LANGUAGE default_lang] [LANGUAGE_FIELD lang_attribute] [SCORE default_score] [SCORE_FIELD score_attribute] [PAYLOAD_FIELD payload_attribute] [MAXTEXTFIELDS] [TEMPORARY seconds] [NOOFFSETS] [NOHL] [NOFIELDS] [NOFREQS] [STOPWORDS count [stopword [stopword ...]]] [SKIPINITIALSCAN] SCHEMA field_name [AS alias] <TEXT | TAG | NUMERIC | GEO | VECTOR> [WITHSUFFIXTRIE] [SORTABLE [UNF]] [NOINDEX] [field_name [AS alias] <TEXT | TAG | NUMERIC | GEO | VECTOR> [WITHSUFFIXTRIE] [SORTABLE [UNF]] [NOINDEX] ...]',
96+
'index [DD]',
97+
'key [INDENT indent] [NEWLINE newline] [SPACE space] [path [path ...]]',
9898
'key [path]'
9999
];
100100
const commands = [
@@ -103,7 +103,7 @@ test
103103
'JSON.GET',
104104
'JSON.DEL'
105105
];
106-
const commandHint = 'key [META] [BLOB]';
106+
const commandHint = 'key [meta] [blob]';
107107
const command = 'ai.modelget';
108108

109109
// Open CLI

tests/e2e/tests/critical-path/workbench/autocomplete.e2e.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,8 @@ test('Verify that user can change any required argument inserted', async t => {
6161
await t.typeText(workbenchPage.queryInput, commandArgumentsForChange[1]);
6262
const scriptAfterEdit = await workbenchPage.queryInputScriptArea.textContent;
6363
// Verify the command after changes
64-
await t.expect(scriptBeforeEdit).notEql(scriptAfterEdit, 'The required arguments are editable');
65-
for(const argument of commandArguments) {
66-
await t.expect(scriptAfterEdit).notContains(argument, `The argument ${argument} is changed`);
67-
}
64+
await t.expect(scriptBeforeEdit).notEql(scriptAfterEdit, 'The required arguments are not editable');
65+
await t.expect(scriptAfterEdit).notContains(commandArguments[0], `The argument ${commandArguments[0]} is not changed`);
6866
});
6967
test('Verify that the list of optional arguments will not be inserted with autocomplete', async t => {
7068
const command = 'ZPOPMAX';

tests/e2e/tests/regression/cli/cli-command-helper.e2e.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ test
8383
.meta({ env: env.web })('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 => {
8484
filteringGroup = 'JSON';
8585
commandToCheck = 'JSON.SET';
86-
commandArgumentsToCheck = 'JSON.SET key path value [condition]';
86+
commandArgumentsToCheck = 'JSON.SET key path value [NX | XX]';
8787
externalPageLink = 'https://redis.io/commands/json.set/';
8888

8989
// Open Command Helper
@@ -103,7 +103,7 @@ test
103103
.meta({ env: env.web })('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 => {
104104
filteringGroup = 'Search';
105105
commandToCheck = 'FT.EXPLAIN';
106-
commandArgumentsToCheck = 'FT.EXPLAIN index query [dialect]';
106+
commandArgumentsToCheck = 'FT.EXPLAIN index query [DIALECT dialect]';
107107
externalPageLink = 'https://redis.io/commands/ft.explain/';
108108

109109
// Open Command Helper
@@ -217,7 +217,7 @@ test
217217
'BF.MEXISTS key item [item ...]',
218218
'CMS.QUERY key item [item ...]',
219219
'TDIGEST.RESET key',
220-
'TOPK.LIST key [withcount]',
220+
'TOPK.LIST key [WITHCOUNT]',
221221
'CF.ADD key item'
222222
];
223223
externalPageLinks = [

tests/e2e/tests/regression/workbench/autocomplete.e2e.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ fixture `Autocomplete for entered commands`
2222
test('Verify that user can open the "read more" about the command by clicking on the ">" icon or "ctrl+space"', async t => {
2323
const command = 'HSET';
2424
const commandDetails = [
25-
'HSET key data [data ...]',
25+
'HSET key field value [field value ...]',
2626
'Creates or modifies the value of a field in a hash.',
2727
'Read more',
2828
'Arguments:',
@@ -72,7 +72,7 @@ test('Verify that user can see the static list of arguments when he uses “Ctrl
7272
await t.pressKey('enter');
7373
// Check that the command is displayed in Editing area after selecting
7474
const script = await workbenchPage.queryInputScriptArea.textContent;
75-
await t.expect(script.replace(/\s/g, ' ')).eql('JSON.ARRAPPEND key value ', 'Result of sent command not exists');
75+
await t.expect(script.replace(/\s/g, ' ')).eql('JSON.ARRAPPEND key value [value ...] ', 'Result of sent command not exists');
7676
// Check that hint with arguments are displayed
7777
await t.expect(workbenchPage.monacoHintWithArguments.visible).ok('Hints with arguments are not displayed');
7878
// Remove hints with arguments

0 commit comments

Comments
 (0)