Skip to content

Commit 9b2bff3

Browse files
fix for regression tests
1 parent a363746 commit 9b2bff3

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

tests/e2e/pageObjects/components/bottom-panel/profiler.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,21 @@ export class Profiler {
3030
* @param command A command which should be displayed in monitor
3131
* @param parameters An arguments which should be displayed in monitor
3232
* @param expected specify is the command is present or not
33+
* @param timeout timeout
3334
*/
34-
async checkCommandInMonitorResults(command: string, parameters?: string[], expected: boolean = true): Promise<void> {
35+
async checkCommandInMonitorResults(command: string, parameters?: string[], expected: boolean = true, timeout: number = 6000): Promise<void> {
3536
const commandArray = command.split(' ');
3637
for (const value of commandArray) {
3738
if(expected){
38-
await t.expect(this.monitorCommandLinePart.withText(value).exists).ok({ timeout: 6000 });
39+
await t.expect(this.monitorCommandLinePart.withText(value).exists).ok({ timeout: timeout });
3940
}
4041
else {
4142
await t.expect(this.monitorCommandLinePart.withText(value).exists).notOk({ timeout: 1000 });
4243
}
4344
}
4445
if (!!parameters) {
4546
for (const argument of parameters) {
46-
await t.expect(this.monitorCommandLinePart.withText(argument).exists).ok({ timeout: 6000 });
47+
await t.expect(this.monitorCommandLinePart.withText(argument).exists).ok({ timeout: timeout });
4748
}
4849
}
4950
}

tests/e2e/tests/web/critical-path/database/connecting-to-the-db.e2e.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,14 @@ test
185185
.after(async() => {
186186
// Delete databases
187187
await databaseAPIRequests.deleteStandaloneDatabaseApi(sshDbClusterPass);
188-
})('Adding OSS Cluster database with SSH', async() => {
188+
})('Adding OSS Cluster database with SSH', async t => {
189189
const sshWithPass = {
190190
...sshParams,
191191
sshPassword: 'pass'
192192
};
193193
// Verify that user can add SSH tunnel with Password for OSS Cluster database
194194
await myRedisDatabasePage.AddRedisDatabaseDialog.addStandaloneSSHDatabase(sshDbClusterPass, sshWithPass);
195+
await t.wait(6000)
195196
await myRedisDatabasePage.clickOnDBByName(sshDbClusterPass.databaseName);
196197
await Common.checkURLContainsText('browser');
197198
});

tests/e2e/tests/web/regression/database-overview/database-tls-certificates.e2e.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ fixture `tls certificates`
1313
.meta({ type: 'regression', rte: rte.none })
1414
.page(commonUrl)
1515
.beforeEach(async() => {
16+
await databaseAPIRequests.deleteAllDatabasesApi();
1617
await databaseAPIRequests.addNewStandaloneDatabaseApi(ossStandaloneConfig);
1718
await myRedisDatabasePage.reloadPage();
1819
await databaseHelper.acceptLicenseTermsAndAddDatabaseApi(ossStandaloneTlsConfig);
1920

2021
})
2122
.afterEach(async() => {
2223
// Delete database
23-
await databaseHelper.deleteDatabase(ossStandaloneTlsConfig.databaseName);
24-
await databaseHelper.deleteDatabase(ossStandaloneConfig.databaseName);
24+
await databaseAPIRequests.deleteAllDatabasesApi();
2525
});
2626
test('Verify that user can remove added certificates', async t => {
2727
await t.click(browserPage.NavigationPanel.myRedisDBButton);
@@ -52,7 +52,7 @@ test('Verify that user can remove added certificates', async t => {
5252
await myRedisDatabasePage.reloadPage();
5353

5454
await myRedisDatabasePage.clickOnDBByName(ossStandaloneConfig.databaseName!);
55-
55+
5656
await t.click(browserPage.NavigationPanel.myRedisDBButton);
5757
await myRedisDatabasePage.clickOnDBByName(ossStandaloneTlsConfig.databaseName);
5858
await t.expect(browserPage.Toast.toastError.textContent).contains('CA or Client certificate', 'user can connect to db without certificates');

tests/e2e/tests/web/regression/monitor/monitor.e2e.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ test('Verify Monitor refresh/stop', async t => {
7070

7171
// Run monitor
7272
await t.click(browserPage.Profiler.startMonitorButton);
73-
await browserPage.Profiler.checkCommandInMonitorResults('info');
73+
74+
await browserPage.Profiler.checkCommandInMonitorResults('info', undefined, true, 8000);
7475
// Click on refresh keys to get new logs
7576
await t.click(browserPage.refreshKeysButton);
7677
// Get last timestamp

0 commit comments

Comments
 (0)