Skip to content

Commit 8ad291e

Browse files
authored
Merge pull request #1888 from RedisInsight/main
merge main into release 2.22.0
2 parents bf4c2b8 + c1be8a4 commit 8ad291e

File tree

6 files changed

+47
-41
lines changed

6 files changed

+47
-41
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ test('Verify Command Helper search and filter', async t => {
7373
// Verify that when user enters command in CLI, Helper displays additional info about the command
7474
await t.expect(cliPage.cliHelperTitleArgs.textContent).eql('APPEND key value', 'Command name and syntax not displayed');
7575
await t.expect(cliPage.cliHelperTitle.innerText).contains('STRING', 'Command Group badge not displayed');
76-
await t.expect(cliPage.cliHelperSummary.innerText).contains('Append a value to a key', 'Command summary not displayed');
76+
await t.expect(cliPage.cliHelperSummary.innerText).contains(`Appends a string to the value of a key. Creates the key if it doesn't exist.`, 'Command summary not displayed');
7777
});
7878
test
7979
.meta({ env: env.web })('Verify that user can type TS. in Command helper and see commands from RedisTimeSeries commands.json', async t => {

tests/e2e/tests/critical-path/workbench/redisearch-module-not-available.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ test('Verify that user can see the information message that the RediSearch modul
2525
// Send command with 'FT.'
2626
await workbenchPage.sendCommandInWorkbench(commandForSend);
2727
// Verify the information message
28-
await t.expect(await workbenchPage.queryCardNoModuleOutput.textContent).eql('RediSearch module is not loaded for this database', 'The information message');
28+
await t.expect(await workbenchPage.commandExecutionResult.textContent).eql('Looks like RediSearch is not available', 'The information message');
2929
});

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ test('Verify that user can open the "read more" about the command by clicking on
2323
const command = 'HSET';
2424
const commandDetails = [
2525
'HSET key data [data ...]',
26-
'Set the string value of a hash field',
26+
'Creates or modifies the value of a field in a hash.',
27+
'Read more',
2728
'Arguments:',
2829
'required key',
2930
'multiple data'

tests/e2e/tests/regression/workbench/command-results.e2e.ts

Lines changed: 18 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { acceptLicenseTermsAndAddDatabaseApi } from '../../../helpers/database';
22
import { WorkbenchPage, MyRedisDatabasePage } from '../../../pageObjects';
33
import {
44
commonUrl,
5-
ossStandaloneRedisearch, ossStandaloneV5Config
5+
ossStandaloneRedisearch
66
} from '../../../helpers/conf';
77
import { env, rte } from '../../../helpers/constants';
88
import { deleteStandaloneDatabaseApi } from '../../../helpers/api/api-database';
@@ -118,37 +118,20 @@ test('Big output in workbench is visible in virtualized table', async t => {
118118
// Verify that all commands scrolled
119119
await t.expect(lastExpectedItem.visible).ok('Final execution time message not displayed');
120120
});
121-
122-
test.before(async t => {
123-
await acceptLicenseTermsAndAddDatabaseApi(ossStandaloneRedisearch, ossStandaloneRedisearch.databaseName);
124-
await t.click(myRedisDatabasePage.workbenchButton);
125-
}).after(async t => {
126-
await t.switchToMainWindow();
127-
await deleteStandaloneDatabaseApi(ossStandaloneRedisearch);
128-
})('Verify that user can see the client List visualization available for all users', async t => {
129-
const command = 'CLIENT LIST';
130-
// Send command in workbench to view client list
131-
await workbenchPage.sendCommandInWorkbench(command);
132-
await t.expect(workbenchPage.typeSelectedClientsList.visible).ok('client list view button is not visible');
133-
await workBenchActions.verifyClientListColumnsAreVisible(['id', 'addr', 'name', 'user']);
134-
// verify table view row count match with text view after client list command
135-
await workBenchActions.verifyClientListTableViewRowCount();
136-
});
137-
// https://redislabs.atlassian.net/browse/RI-4230
138-
test.before(async t => {
139-
await acceptLicenseTermsAndAddDatabaseApi(ossStandaloneV5Config, ossStandaloneV5Config.databaseName);
140-
await t.click(myRedisDatabasePage.workbenchButton);
141-
}).after(async() => {
142-
await deleteStandaloneDatabaseApi(ossStandaloneV5Config);
143-
})('Verify that user can see options on what can be done to work with capabilities in Workbench for docker', async t => {
144-
const commandJSON = 'JSON.ARRAPPEND key value';
145-
const commandFT = 'FT.LIST';
146-
await workbenchPage.sendCommandInWorkbench(commandJSON);
147-
// Verify change screens when capability not available - 'Search'
148-
await t.expect(workbenchPage.welcomePageTitle.withText('Looks like RedisJSON is not available').visible)
149-
.ok('Missing RedisJSON title is not visible');
150-
await workbenchPage.sendCommandInWorkbench(commandFT);
151-
// Verify change screens when capability not available - 'JSON'
152-
await t.expect(workbenchPage.welcomePageTitle.withText('Looks like RediSearch is not available').visible)
153-
.ok('Missing RedisJSON title is not visible');
154-
});
121+
test
122+
.before(async t => {
123+
await acceptLicenseTermsAndAddDatabaseApi(ossStandaloneRedisearch, ossStandaloneRedisearch.databaseName);
124+
await t.click(myRedisDatabasePage.workbenchButton);
125+
})
126+
.after(async t => {
127+
await t.switchToMainWindow();
128+
await deleteStandaloneDatabaseApi(ossStandaloneRedisearch);
129+
})('Verify that user can see the client List visualization available for all users', async t => {
130+
const command = 'CLIENT LIST';
131+
// Send command in workbench to view client list
132+
await workbenchPage.sendCommandInWorkbench(command);
133+
await t.expect(workbenchPage.typeSelectedClientsList.visible).ok('client list view button is not visible');
134+
await workBenchActions.verifyClientListColumnsAreVisible(['id', 'addr', 'name', 'user']);
135+
// verify table view row count match with text view after client list command
136+
await workBenchActions.verifyClientListTableViewRowCount();
137+
});

tests/e2e/tests/regression/workbench/redisearch-module-not-available.e2e.ts

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ fixture `Redisearch module not available`
2323
// Delete database
2424
await deleteStandaloneDatabaseApi(ossStandaloneV5Config);
2525
});
26-
test
26+
// Skipped as outdated after implementing RI-4230
27+
test.skip
2728
.meta({ env: env.web, rte: rte.standalone })('Verify that user can see the "Create your free Redis database with RediSearch on Redis Cloud" button and click on it in Workbench when module in not loaded', async t => {
2829
const link = 'https://redis.com/try-free/?utm_source=redis&utm_medium=app&utm_campaign=redisinsight_redisearch';
2930

@@ -36,3 +37,24 @@ test
3637
await t.expect(getPageUrl()).contains(link, 'The Try Redis Enterprise page is not opened');
3738
await t.switchToParentWindow();
3839
});
40+
// https://redislabs.atlassian.net/browse/RI-4230
41+
test
42+
.meta({ env: env.web, rte: rte.standalone })
43+
.before(async t => {
44+
await acceptLicenseTermsAndAddDatabaseApi(ossStandaloneV5Config, ossStandaloneV5Config.databaseName);
45+
await t.click(myRedisDatabasePage.workbenchButton);
46+
})
47+
.after(async() => {
48+
await deleteStandaloneDatabaseApi(ossStandaloneV5Config);
49+
})('Verify that user can see options on what can be done to work with capabilities in Workbench for docker', async t => {
50+
const commandJSON = 'JSON.ARRAPPEND key value';
51+
const commandFT = 'FT.LIST';
52+
await workbenchPage.sendCommandInWorkbench(commandJSON);
53+
// Verify change screens when capability not available - 'Search'
54+
await t.expect(workbenchPage.welcomePageTitle.withText('Looks like RedisJSON is not available').visible)
55+
.ok('Missing RedisJSON title is not visible');
56+
await workbenchPage.sendCommandInWorkbench(commandFT);
57+
// Verify change screens when capability not available - 'JSON'
58+
await t.expect(workbenchPage.welcomePageTitle.withText('Looks like RediSearch is not available').visible)
59+
.ok('Missing RedisJSON title is not visible');
60+
});

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ test('Verify that user can click on any of searched commands in Command Helper a
5858
// Verify details of the command
5959
await t.expect(cliPage.cliHelperTitleArgs.textContent).eql('APPEND key value', 'Command name and syntax not correct');
6060
await t.expect(cliPage.cliHelperTitle.innerText).contains('STRING', 'Command Group badge not correct');
61-
await t.expect(cliPage.cliHelperSummary.innerText).contains('Append a value to a key Read more', 'Command summary not correct');
61+
await t.expect(cliPage.cliHelperSummary.innerText).contains(`Appends a string to the value of a key. Creates the key if it doesn't exist.`, 'Command summary not correct');
6262
});
6363
test('Verify that when user enters command, he can see Command Name, Complexity, Arguments, Summary, Group, Read more', async t => {
6464
const commandForSearch = 'pop';
@@ -73,7 +73,7 @@ test('Verify that when user enters command, he can see Command Name, Complexity,
7373
await t.expect(cliPage.cliHelperTitleArgs.innerText).eql('LPOP key [count]', 'Command Name not correct');
7474
await t.expect(cliPage.cliHelperComplexity.innerText).eql('Complexity:\nO(N) where N is the number of elements returned', 'Complexity not correct');
7575
await t.expect(cliPage.cliHelperArguments.innerText).eql('Arguments:\nRequired\nkey\nOptional\n[count]', 'Arguments not correct');
76-
await t.expect(cliPage.cliHelperSummary.innerText).contains('Remove and get the first elements in a list', 'Command Summary not correct');
76+
await t.expect(cliPage.cliHelperSummary.innerText).contains('Returns the first elements in a list after removing it. Deletes the list if the last element was popped.', 'Command Summary not correct');
7777
await t.expect(cliPage.cliHelperTitle.innerText).contains('LIST', 'Command Group not correct');
7878
await t.expect(cliPage.readMoreButton.exists).ok('Read more button not displayed');
7979
});

0 commit comments

Comments
 (0)