Skip to content

Commit 9d2d4d5

Browse files
Merge pull request #3270 from RedisInsight/e2e/bugfix/release/2.48.0
fix for sample tests
2 parents 9b96e9c + 5d2f21f commit 9d2d4d5

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

tests/e2e/tests/web/regression/tree-view/tree-view.e2e.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
ossStandaloneBigConfig,
66
ossStandaloneConfig,
77
ossStandaloneConfigEmpty,
8-
ossStandaloneRedisearch, ossStandaloneRedisGears
8+
ossStandaloneRedisGears
99
} from '../../../../helpers/conf';
1010
import { ExploreTabs, KeyTypesTexts, rte } from '../../../../helpers/constants';
1111
import { DatabaseAPIRequests } from '../../../../helpers/api/api-database';
@@ -34,10 +34,12 @@ fixture `Tree view verifications`
3434
test
3535
.before(async() => {
3636
await databaseHelper.acceptLicenseTermsAndAddDatabaseApi(ossStandaloneConfigEmpty);
37+
await browserPage.Cli.sendCommandInCli('flushdb');
3738
})
3839
.after(async() => {
3940
// Delete database
4041
await databaseAPIRequests.deleteStandaloneDatabaseApi(ossStandaloneConfigEmpty);
42+
await browserPage.Cli.sendCommandInCli('flushdb');
4143
})('Verify that user has load sample data button when there are no keys in the database', async t => {
4244
const message = 'Let\'sstartworkingLoadsampledata+Addkeymanually';
4345
const actualMessage = await browserPage.keyListMessage.innerText;
@@ -63,6 +65,7 @@ test
6365
tutorial: 'Probabilistic'
6466
}];
6567

68+
await t.click(browserPage.refreshKeysButton);
6669
await t.expect(browserPage.guideLinksBtn.count).gte(5);
6770
for (const capability of capabilities) {
6871
await browserPage.clickGuideLinksByName(capability.name);
@@ -79,10 +82,10 @@ test
7982
// Verify that user can see the same tutorial opened as on the list of databases when clicking on capabilities
8083
await t.click(browserPage.loadSampleDataBtn);
8184
await t.click(browserPage.executeBulkKeyLoadBtn);
82-
await t.expect(browserPage.Toast.toastCloseButton.exists).ok('the info message after upload does not appear');
85+
await t.expect(browserPage.Toast.toastBody.textContent).contains('0Errors', 'the info message after upload does not appear');
8386
const totalKeysValue = Number(await browserPage.totalKeysNumber.textContent);
84-
// the number should be updated after real prod data will bw load
85-
await t.expect(totalKeysValue).eql(2, 'the info message after upload does not appear');
87+
// the number should be updated after real prod data will be loaded
88+
await t.expect(totalKeysValue).gte(100, 'the info message after upload does not appear');
8689
});
8790

8891
test
@@ -96,14 +99,14 @@ test
9699
await databaseAPIRequests.deleteStandaloneDatabaseApi(ossStandaloneRedisGears);
97100
})('Verify that user can load sample data if database does not have modules', async t => {
98101
// Verify the message
99-
await t.click(browserPage.treeViewButton);
102+
await t.click(browserPage.refreshKeysButton);
100103
await t.click(browserPage.loadSampleDataBtn);
101104
await t.click(browserPage.executeBulkKeyLoadBtn);
102105
//verify that there is no errors if some modules are not added
103106
await t.expect(browserPage.Toast.toastBody.textContent).contains('0Errors', 'the info message after upload does not appear');
104107
const totalKeysValue = Number(await browserPage.totalKeysNumber.textContent);
105108
// the number should be updated after real prod data will bw load
106-
await t.expect(totalKeysValue).eql(1, 'the info message after upload does not appear');
109+
await t.expect(totalKeysValue).gte(10, 'the info message after upload does not appear');
107110
});
108111

109112
test('Verify that user can see the total number of keys, the number of keys scanned, the “Scan more” control displayed at the top of Tree view and Browser view', async t => {

0 commit comments

Comments
 (0)