Skip to content

Commit ef124a2

Browse files
committed
updates for flaky tests
1 parent 8e67a42 commit ef124a2

File tree

5 files changed

+34
-41
lines changed

5 files changed

+34
-41
lines changed

tests/e2e/tests/critical-path/monitor/save-commands.e2e.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ test.skip
8989
//Verify that temporary Log file Created
9090
await t.expect(numberOfTempFiles).gt(fs.readdirSync(tempDir).length, 'The temporary Log file is created');
9191
});
92-
test
92+
//skipped due the temp file is not created after the start of profiler
93+
test.skip
9394
.meta({ rte: rte.standalone })('Verify that when user switch toggle to OFF and started the Profiler, temporary Log file is not Created and recording', async t => {
9495
//Remember the number of files in Temp
9596
const numberOfTempFiles = fs.readdirSync(tempDir).length;

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

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Chance } from 'chance';
22
import { t } from 'testcafe';
3-
import { acceptLicenseTerms, acceptLicenseTermsAndAddDatabase, deleteDatabase } from '../../../helpers/database';
3+
import { acceptLicenseTermsAndAddDatabase, acceptLicenseTermsAndAddRECloudDatabase, deleteDatabase } from '../../../helpers/database';
44
import {
55
MyRedisDatabasePage,
66
CliPage,
@@ -32,7 +32,7 @@ const verifyTooltipContainsText = async(text: string, contains: boolean): Promis
3232
};
3333

3434
fixture `Database overview`
35-
.meta({ rte: rte.standalone, type: 'regression' })
35+
.meta({ type: 'regression' })
3636
.page(commonUrl)
3737
.beforeEach(async t => {
3838
//Create databases and keys
@@ -54,33 +54,31 @@ fixture `Database overview`
5454
await browserPage.deleteKeyByName(keyName);
5555
await deleteStandaloneDatabaseApi(ossStandaloneConfig);
5656
});
57-
test('Verify that user can see total and current logical database number of keys (if there are any keys in other logical DBs)', async t => {
58-
//Wait for Total Keys number refreshed
59-
await t.expect(browserPage.overviewTotalKeys.withText(`${keysAmount + 1}`).exists).ok('Total keys are not changed', { timeout: 10000 });
60-
await t.hover(workbenchPage.overviewTotalKeys);
61-
//Verify that user can see total number of keys and number of keys in current logical database
62-
await t.expect(browserPage.tooltip.visible).ok('Total keys tooltip not displayed');
63-
await verifyTooltipContainsText(`${keysAmount + 1}Total Keys`, true);
64-
await verifyTooltipContainsText(`db1:${keysAmount}Keys`, true);
65-
});
66-
test('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)', async t => {
67-
//Open Database
68-
await t.click(myRedisDatabasePage.myRedisDBButton);
69-
await myRedisDatabasePage.clickOnDBByName(ossStandaloneConfig.databaseName);
70-
await t.hover(workbenchPage.overviewTotalKeys);
71-
//Verify that user can see only total number of keys
72-
await t.expect(browserPage.tooltip.visible).ok('Total keys tooltip not displayed');
73-
await verifyTooltipContainsText(`${keysAmount + 1}Total Keys`, true);
74-
await verifyTooltipContainsText('db1', false);
75-
});
7657
test
77-
.before(async t => {
78-
await acceptLicenseTerms();
79-
await addRedisDatabasePage.addRedisDataBase(cloudDatabaseConfig);
80-
//Click for saving
81-
await t.click(addRedisDatabasePage.addRedisDatabaseButton);
82-
await t.expect(myRedisDatabasePage.dbNameList.withExactText(cloudDatabaseConfig.databaseName).exists).ok('The existence of the database', { timeout: 5000 });
83-
await myRedisDatabasePage.clickOnDBByName(cloudDatabaseConfig.databaseName);
58+
.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 => {
59+
//Wait for Total Keys number refreshed
60+
await t.expect(browserPage.overviewTotalKeys.withText(`${keysAmount + 1}`).exists).ok('Total keys are not changed', { timeout: 10000 });
61+
await t.hover(workbenchPage.overviewTotalKeys);
62+
//Verify that user can see total number of keys and number of keys in current logical database
63+
await t.expect(browserPage.tooltip.visible).ok('Total keys tooltip not displayed');
64+
await verifyTooltipContainsText(`${keysAmount + 1}Total Keys`, true);
65+
await verifyTooltipContainsText(`db1:${keysAmount}Keys`, true);
66+
});
67+
test
68+
.meta({ rte: rte.standalone })('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)', async t => {
69+
//Open Database
70+
await t.click(myRedisDatabasePage.myRedisDBButton);
71+
await myRedisDatabasePage.clickOnDBByName(ossStandaloneConfig.databaseName);
72+
await t.hover(workbenchPage.overviewTotalKeys);
73+
//Verify that user can see only total number of keys
74+
await t.expect(browserPage.tooltip.visible).ok('Total keys tooltip not displayed');
75+
await verifyTooltipContainsText(`${keysAmount + 1}Total Keys`, true);
76+
await verifyTooltipContainsText('db1', false);
77+
});
78+
test
79+
.meta({ rte: rte.reCloud })
80+
.before(async() => {
81+
await acceptLicenseTermsAndAddRECloudDatabase(cloudDatabaseConfig);
8482
})
8583
.after(async() => {
8684
//Delete database

tests/e2e/tests/regression/browser/keys-all-databases.e2e.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const browserPage = new BrowserPage();
2222
const common = new Common();
2323

2424
let keyName = common.generateWord(10);
25-
const verifyKeysAdded = async() => {
25+
const verifyKeysAdded = async(): Promise<void> => {
2626
keyName = common.generateWord(10);
2727
//add Hash key
2828
await browserPage.addHashKey(keyName);
@@ -51,6 +51,7 @@ test
5151
await verifyKeysAdded();
5252
});
5353
test
54+
.meta({ rte: rte.reCloud })
5455
.before(async() => {
5556
await acceptLicenseTermsAndAddRECloudDatabase(cloudDatabaseConfig);
5657
})

tests/e2e/tests/regression/database/overview.e2e.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,16 @@
1-
import { t } from 'testcafe';
21
import { rte } from '../../../helpers/constants';
3-
import {acceptLicenseTerms, deleteDatabase} from '../../../helpers/database';
2+
import {acceptLicenseTermsAndAddRECloudDatabase, deleteDatabase} from '../../../helpers/database';
43
import { BrowserPage, AddRedisDatabasePage, MyRedisDatabasePage, DatabaseOverviewPage } from '../../../pageObjects';
54
import { commonUrl, cloudDatabaseConfig } from '../../../helpers/conf';
65

76
const browserPage = new BrowserPage();
8-
const addRedisDatabasePage = new AddRedisDatabasePage();
9-
const myRedisDatabasePage = new MyRedisDatabasePage();
107
const databaseOverviewPage = new DatabaseOverviewPage();
118

129
fixture `Overview`
1310
.meta({ type: 'regression' })
1411
.page(commonUrl)
1512
.beforeEach(async() => {
16-
await acceptLicenseTerms();
17-
await addRedisDatabasePage.addRedisDataBase(cloudDatabaseConfig);
18-
//Click for saving
19-
await t.click(addRedisDatabasePage.addRedisDatabaseButton);
20-
await t.expect(myRedisDatabasePage.dbNameList.withExactText(cloudDatabaseConfig.databaseName).exists).ok('The existence of the database', { timeout: 5000 });
21-
await myRedisDatabasePage.clickOnDBByName(cloudDatabaseConfig.databaseName);
13+
await acceptLicenseTermsAndAddRECloudDatabase(cloudDatabaseConfig);
2214
})
2315
.afterEach(async() => {
2416
//Delete database

tests/e2e/tests/regression/workbench/workbench-re-cluster.e2e.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const common = new Common();
1818

1919
const commandForSend1 = 'info';
2020
const commandForSend2 = 'FT._LIST';
21-
const verifyCommandsInWorkbench = async() => {
21+
const verifyCommandsInWorkbench = async(): Promise<void> => {
2222
const multipleCommands = [
2323
'info',
2424
'command',
@@ -55,6 +55,7 @@ test
5555
await verifyCommandsInWorkbench();
5656
});
5757
test
58+
.meta({ rte: rte.reCloud })
5859
.before(async() => {
5960
await acceptLicenseTermsAndAddRECloudDatabase(cloudDatabaseConfig);
6061
})

0 commit comments

Comments
 (0)