Skip to content

Commit 25bfb16

Browse files
committed
fixes for tests
1 parent 08dff37 commit 25bfb16

File tree

4 files changed

+21
-23
lines changed

4 files changed

+21
-23
lines changed

tests/e2e/pageObjects/add-redis-database-page.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,10 @@ export class AddRedisDatabasePage {
8888
await t.typeText(this.passwordInput, parameters.databasePassword, { replace: true, paste: true });
8989
}
9090
// Enter logical index
91-
await t
92-
.click(this.databaseIndexCheckbox)
93-
.typeText(this.databaseIndexInput, index, { replace: true, paste: true})
91+
await t.click(this.databaseIndexCheckbox);
92+
await t.typeText(this.databaseIndexInput, index, { replace: true, paste: true});
9493
// Click for saving
95-
.click(this.addRedisDatabaseButton);
94+
await t.click(this.addRedisDatabaseButton);
9695
}
9796

9897
/**
@@ -117,7 +116,7 @@ export class AddRedisDatabasePage {
117116

118117
/**
119118
* Adding a new database from RE Cluster via auto-discover flow
120-
* @param prameters the parameters of the database
119+
* @param parameters the parameters of the database
121120
*/
122121
async addAutodiscoverREClucterDatabase(parameters: AddNewDatabaseParameters): Promise<void> {
123122
await t

tests/e2e/pageObjects/browser-page.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -510,10 +510,9 @@ export class BrowserPage {
510510
if (await this.toastCloseButton.exists) {
511511
await t.click(this.toastCloseButton);
512512
}
513-
await t
514-
.click(this.keyNameInTheList)
515-
.click(this.deleteKeyButton)
516-
.click(this.confirmDeleteKeyButton);
513+
await t.click(this.keyNameInTheList);
514+
await t.click(this.deleteKeyButton);
515+
await t.click(this.confirmDeleteKeyButton);
517516
}
518517

519518
/**
@@ -522,10 +521,9 @@ export class BrowserPage {
522521
*/
523522
async deleteKeyByName(keyName: string): Promise<void> {
524523
await this.searchByKeyName(keyName);
525-
await t
526-
.click(this.keyNameInTheList)
527-
.click(this.deleteKeyButton)
528-
.click(this.confirmDeleteKeyButton);
524+
await t.click(this.keyNameInTheList);
525+
await t.click(this.deleteKeyButton);
526+
await t.click(this.confirmDeleteKeyButton);
529527
}
530528

531529
/**

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

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ import {
88
AddRedisDatabasePage
99
} from '../../../pageObjects';
1010
import { rte } from '../../../helpers/constants';
11-
import { cloudDatabaseConfig, commonUrl, ossStandaloneConfig } from '../../../helpers/conf';
11+
import { cloudDatabaseConfig, commonUrl, ossStandaloneRedisearch } from '../../../helpers/conf';
1212
import { Common } from '../../../helpers/common';
1313
import { deleteStandaloneDatabaseApi } from '../../../helpers/api/api-database';
14+
import { deleteAllKeysFromDB } from '../../../helpers/keys';
1415

1516
const myRedisDatabasePage = new MyRedisDatabasePage();
1617
const workbenchPage = new WorkbenchPage();
@@ -34,23 +35,23 @@ fixture `Database overview`
3435
.page(commonUrl)
3536
.beforeEach(async t => {
3637
// Create databases and keys
37-
await acceptLicenseTermsAndAddDatabase(ossStandaloneConfig, ossStandaloneConfig.databaseName);
38+
await acceptLicenseTermsAndAddDatabase(ossStandaloneRedisearch, ossStandaloneRedisearch.databaseName);
3839
await browserPage.addStringKey(keyName);
3940
await t.click(myRedisDatabasePage.myRedisDBButton);
40-
await addRedisDatabasePage.addLogicalRedisDatabase(ossStandaloneConfig, index);
41-
await myRedisDatabasePage.clickOnDBByName(`${ossStandaloneConfig.databaseName} [${index}]`);
41+
await addRedisDatabasePage.addLogicalRedisDatabase(ossStandaloneRedisearch, index);
42+
await myRedisDatabasePage.clickOnDBByName(`${ossStandaloneRedisearch.databaseName} [${index}]`);
4243
keys = await common.createArrayWithKeyValue(keysAmount);
4344
await cliPage.sendCommandInCli(`MSET ${keys.join(' ')}`);
4445
})
4546
.afterEach(async t => {
4647
// Clear and delete databases
4748
await t.click(myRedisDatabasePage.myRedisDBButton);
48-
await myRedisDatabasePage.clickOnDBByName(`${ossStandaloneConfig.databaseName} [${index}]`);
49+
await myRedisDatabasePage.clickOnDBByName(`${ossStandaloneRedisearch.databaseName} [${index}]`);
4950
await cliPage.sendCommandInCli(`DEL ${keys.join(' ')}`);
50-
await deleteDatabase(`${ossStandaloneConfig.databaseName} [${index}]`);
51-
await myRedisDatabasePage.clickOnDBByName(ossStandaloneConfig.databaseName);
51+
await deleteDatabase(`${ossStandaloneRedisearch.databaseName} [${index}]`);
52+
await myRedisDatabasePage.clickOnDBByName(ossStandaloneRedisearch.databaseName);
5253
await browserPage.deleteKeyByName(keyName);
53-
await deleteStandaloneDatabaseApi(ossStandaloneConfig);
54+
await deleteStandaloneDatabaseApi(ossStandaloneRedisearch);
5455
});
5556
test
5657
.meta({ rte: rte.standalone })('Verify that user can see total and current logical database number of keys (if there are any keys in other logical DBs)', async t => {
@@ -64,7 +65,7 @@ test
6465

6566
// Open Database
6667
await t.click(myRedisDatabasePage.myRedisDBButton);
67-
await myRedisDatabasePage.clickOnDBByName(ossStandaloneConfig.databaseName);
68+
await myRedisDatabasePage.clickOnDBByName(ossStandaloneRedisearch.databaseName);
6869
await t.hover(workbenchPage.overviewTotalKeys);
6970
// 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)
7071
await t.expect(browserPage.tooltip.visible).ok('Total keys tooltip not displayed');

tests/e2e/tests/regression/browser/ttl-format.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ test
6969
// Check that TTL reduces every page refresh
7070
while (await browserPage.isKeyIsDisplayedInTheList(keyName)) {
7171
const actualTTL = Number((await ttlValueElement.innerText).slice(0, -2));
72-
await t.expect(actualTTL).lte(ttlToCompare);
72+
await t.expect(actualTTL).lte(ttlToCompare, 'Wrong TTL displayed');
7373
await t.click(browserPage.refreshKeysButton);
7474
ttlToCompare = actualTTL;
7575
}

0 commit comments

Comments
 (0)