Skip to content

Commit 89ea55c

Browse files
authored
Merge pull request #3071 from RedisInsight/e2e/feature/RI-4643-fixes
e2e fixes for RI-4643
2 parents 7730ef7 + 8dc748d commit 89ea55c

File tree

4 files changed

+5
-44
lines changed

4 files changed

+5
-44
lines changed

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

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,6 @@ fixture `CLI critical`
3030
// Delete database
3131
await databaseAPIRequests.deleteStandaloneDatabaseApi(ossStandaloneConfig);
3232
});
33-
test
34-
.meta({ rte: rte.ossCluster })
35-
.before(async() => {
36-
await databaseHelper.acceptLicenseTermsAndAddOSSClusterDatabase(ossClusterConfig);
37-
})
38-
.after(async() => {
39-
// Clear and delete database
40-
await browserPage.deleteKeyByName(keyName);
41-
await databaseAPIRequests.deleteOSSClusterDatabaseApi(ossClusterConfig);
42-
})('Verify that user is redirected to another node when he works in CLI with OSS Cluster', async t => {
43-
keyName = Common.generateWord(10);
44-
// Open CLI
45-
await t.click(browserPage.Cli.cliExpandButton);
46-
// Add key from CLI
47-
for ([keyName, value] of pairsToSet) {
48-
await t.typeText(browserPage.Cli.cliCommandInput, `SET ${keyName} ${value}`, { replace: true, paste: true });
49-
await t.pressKey('enter');
50-
}
51-
// Check that user is redirected
52-
await t.expect(await browserPage.Cli.cliArea.textContent).contains('Redirected to', 'User command was not redirected to another node');
53-
});
5433
test
5534
.meta({ rte: rte.standalone })('Verify that Redis returns error if command is not correct when user works with CLI', async t => {
5635
//Open CLI

tests/e2e/tests/web/regression/cli/cli-logical-db.e2e.ts

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,9 @@ test
4242
await t.expect(browserPage.Cli.cliArea.textContent).contains(text, 'No DB index is not displayed in the CLI message');
4343
}
4444
await t.expect(browserPage.Cli.cliDbIndex.visible).eql(false, 'No DB index before the > character in CLI is not displayed');
45-
await t.expect(browserPage.Cli.cliEndpoint.textContent).eql(databaseEndpoint, 'Database index 0 is not displayed in the CLI endpoint');
4645
});
4746
test('Verify that working with logical DBs, user can see N DB index in CLI', async t => {
4847
index = '1';
49-
databaseEndpoint = `${ossStandaloneConfig.host}:${ossStandaloneConfig.port}[db${index}]`;
5048

5149
await myRedisDatabasePage.AddRedisDatabase.addLogicalRedisDatabase(ossStandaloneConfig, index);
5250
await myRedisDatabasePage.clickOnDBByName(`${ossStandaloneConfig.databaseName } [db${index}]`);
@@ -58,13 +56,10 @@ test('Verify that working with logical DBs, user can see N DB index in CLI', asy
5856
await t.expect(browserPage.Cli.cliArea.textContent).contains(text, 'DB index is not displayed in the CLI message');
5957
}
6058
await t.expect(browserPage.Cli.cliDbIndex.textContent).eql(`[db${index}] `, 'DB index before the > character in CLI is not displayed');
61-
await t.expect(browserPage.Cli.cliEndpoint.textContent).eql(databaseEndpoint, 'Database index is not displayed in the CLI endpoint');
6259
});
6360
test('Verify that user can see DB index in the endpoint in CLI header is automatically changed when switched to another logical DB', async t => {
6461
index = '2';
6562
const indexAfter = '3';
66-
databaseEndpoint = `${ossStandaloneConfig.host}:${ossStandaloneConfig.port}[db${index}]`;
67-
const databaseEndpointAfter = `${ossStandaloneConfig.host}:${ossStandaloneConfig.port}[db${indexAfter}]`;
6863

6964
await myRedisDatabasePage.AddRedisDatabase.addLogicalRedisDatabase(ossStandaloneConfig, index);
7065
await myRedisDatabasePage.clickOnDBByName(`${ossStandaloneConfig.databaseName } [db${index}]`);
@@ -78,18 +73,8 @@ test('Verify that user can see DB index in the endpoint in CLI header is automat
7873
// Verify that when user re-creates client in CLI the new client is connected to the DB index selected for the DB by default
7974
await t.expect(browserPage.Cli.cliDbIndex.textContent).eql(`[db${index}] `, 'The new client is not connected to the DB index selected for the DB by default');
8075

81-
// Open CLI and verify the database index in the endpoint
82-
await t.expect(browserPage.Cli.cliEndpoint.textContent).eql(databaseEndpoint, `The endpoint in CLI header not contains ${index} index`);
83-
// Minimize and maximize CLI
84-
await t.click(browserPage.Cli.minimizeCliButton);
85-
await t.click(browserPage.Cli.cliExpandButton);
86-
// Verify that user can work with selected logical DB in CLI when he minimazes and then maximizes the CLI
87-
await t.expect(browserPage.Cli.cliEndpoint.textContent).eql(databaseEndpoint, `The endpoint in CLI header not contains ${index} index after minimize`);
88-
89-
// Open CLI and verify the database index in the endpoint
90-
await t.expect(browserPage.Cli.cliEndpoint.textContent).eql(databaseEndpoint, `The endpoint in CLI header not contains ${index} index`);
9176
// Switch to another logical database and check endpoint
9277
await t.typeText(browserPage.Cli.cliCommandInput, `Select ${indexAfter}`, { paste: true });
9378
await t.pressKey('enter');
94-
await t.expect(browserPage.Cli.cliEndpoint.textContent).eql(databaseEndpointAfter, `The endpoint in CLI header is not automatically changed to the new ${indexAfter}`);
79+
await t.expect(browserPage.Cli.cliDbIndex.textContent).eql(`[db${indexAfter}] `, `Db index is not automatically changed to the new ${indexAfter}`);
9580
});

tests/e2e/tests/web/regression/cli/cli.e2e.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,7 @@ test
9797
// Delete database
9898
await databaseAPIRequests.deleteStandaloneDatabaseApi(ossStandaloneConfig);
9999
})('Verify that user can use "Up" and "Down" keys to view previous commands in CLI in the application', async t => {
100-
const databaseEndpoint = `${ossStandaloneConfig.host}:${ossStandaloneConfig.port}`;
101-
102100
await t.click(browserPage.Cli.cliExpandButton);
103-
// Verify that user can see DB endpoint in the header of CLI
104-
await t.expect(browserPage.Cli.cliEndpoint.textContent).eql(databaseEndpoint, 'The user can not see DB endpoint in the header of CLI');
105-
106101
await t.expect(browserPage.Cli.cliCommandInput.innerText).eql('');
107102
for (let i = cliCommands.length - 1; i >= 0; i--) {
108103
await t.pressKey('up');

tests/e2e/tests/web/regression/database-overview/database-overview-keys.e2e.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ test
5454
await t.hover(workbenchPage.OverviewPanel.overviewTotalKeys);
5555
// Verify that user can see total number of keys and number of keys in current logical database
5656
await t.expect(browserPage.tooltip.visible).ok('Total keys tooltip not displayed');
57-
await browserActions.verifyTooltipContainsText(`${keysAmount + 1}Total Keys`, true);
57+
await browserActions.verifyTooltipContainsText(`${keysAmount + 1}`, true);
58+
await browserActions.verifyTooltipContainsText(`Total Keys`, true);
5859
await browserActions.verifyTooltipContainsText(`db1:${keysAmount}Keys`, true);
5960

6061
// Open Database
@@ -63,7 +64,8 @@ test
6364
await t.hover(workbenchPage.OverviewPanel.overviewTotalKeys);
6465
// Verify that user can see total number of keys and not it current logical database (if there are no any keys in other logical DBs)
6566
await t.expect(browserPage.tooltip.visible).ok('Total keys tooltip not displayed');
66-
await browserActions.verifyTooltipContainsText(`${keysAmount + 1}Total Keys`, true);
67+
await browserActions.verifyTooltipContainsText(`${keysAmount + 1}`, true);
68+
await browserActions.verifyTooltipContainsText(`Total Keys`, true);
6769
await browserActions.verifyTooltipContainsText('db1', false);
6870
});
6971
test

0 commit comments

Comments
 (0)