Skip to content

Commit 62f728d

Browse files
e2e test - cli hints
1 parent 68a91ef commit 62f728d

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,26 @@ test('Verify that user can scroll commands using "Tab" in CLI & execute it', asy
8686
//Check that command was executed and user got success result
8787
await t.expect(cliPage.cliOutputResponseSuccess.exists).ok('Command from autocomplete was found & executed');
8888
});
89+
test('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 => {
90+
const commandHints =[
91+
'index [ON HASH|JSON] [PREFIX count prefix [prefix ...]] [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] [count stopword [stopword ...]] SCHEMA field_name [AS alias] TEXT|TAG|NUMERIC|GEO [SORTABLE [UNF]] [NOINDEX]',
92+
'index [DD]',
93+
'key [INDENT indent] [NEWLINE newline] [SPACE space] [paths [paths ...]]',
94+
'key [path]'
95+
];
96+
const commands = [
97+
'FT.CREATE',
98+
'FT.DROPINDEX',
99+
'JSON.GET',
100+
'JSON.DEL'
101+
];
102+
await addNewStandaloneDatabase(ossStandaloneConfig);
103+
await myRedisDatabasePage.clickOnDBByName(ossStandaloneConfig.databaseName);
104+
//Open CLI
105+
await t.click(cliPage.cliExpandButton);
106+
//Enter commands and check hints with arguments
107+
for(let command of commands) {
108+
await t.typeText(cliPage.cliCommandInput, command, { replace: true });
109+
await t.expect(cliPage.cliCommandAutocomplete.textContent).eql(commandHints[commands.indexOf(command)], `The hints with arguments for command ${command}`);
110+
}
111+
});

0 commit comments

Comments
 (0)