Skip to content

Commit fa554d8

Browse files
authored
Merge pull request #2673 from RedisInsight/e2e/bugfix/regression-web-fixes
E2e/bugfix/regression web fixes
2 parents 2f68474 + d843932 commit fa554d8

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

tests/e2e/tests/web/critical-path/url-handling/url-handling.e2e.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ const databaseHelper = new DatabaseHelper();
1414

1515
let { host, port, databaseName, databaseUsername = '', databasePassword = '' } = ossStandaloneRedisGears;
1616

17+
function generateLink(params: Record<string, any>): string {
18+
const params1 = Common.generateUrlTParams(params);
19+
const from = encodeURIComponent(`${redisConnect}?${params1}`);
20+
return (new URL(`?from=${from}`, commonUrl)).toString();
21+
}
22+
1723
const redisConnect = 'redisinsight://databases/connect';
1824

1925
fixture `Add DB from SM`
@@ -34,12 +40,12 @@ test
3440
};
3541

3642
await t.navigateTo(generateLink(connectUrlParams));
37-
await t.expect(await myRedisDatabasePage.AddRedisDatabase.disabledDatabaseInfo.nth(0).getAttribute('title')).contains(host, 'Wrong host value');
38-
await t.expect(await myRedisDatabasePage.AddRedisDatabase.disabledDatabaseInfo.nth(1).getAttribute('title')).contains(port, 'Wrong port value');
39-
await t.click(await myRedisDatabasePage.AddRedisDatabase.addRedisDatabaseButton);
43+
await t.expect(myRedisDatabasePage.AddRedisDatabase.disabledDatabaseInfo.nth(0).getAttribute('title')).contains(host, 'Wrong host value');
44+
await t.expect(myRedisDatabasePage.AddRedisDatabase.disabledDatabaseInfo.nth(1).getAttribute('title')).contains(port, 'Wrong port value');
45+
await t.click(myRedisDatabasePage.AddRedisDatabase.addRedisDatabaseButton);
4046
// wait for db is added
41-
await t.wait(3_000);
42-
await t.expect(await workbenchPage.closeEnablementPage.exists).ok('Redirection to Workbench tutorial is not correct');
47+
await t.wait(7_000);
48+
await t.expect(workbenchPage.closeEnablementPage.exists).ok('Redirection to Workbench tutorial is not correct');
4349
});
4450

4551
test
@@ -71,18 +77,12 @@ test
7177

7278
await t.navigateTo(generateLink(connectUrlParams));
7379
await t.wait(7_000);
74-
await t.expect(await workbenchPage.closeEnablementPage.exists).ok('Redirection to Workbench tutorial is not correct');
80+
await t.expect(workbenchPage.closeEnablementPage.exists).ok('Redirection to Workbench tutorial is not correct');
7581

7682
//Verify that the same db is not added
7783
await t.navigateTo(generateLink(connectUrlParams));
78-
await t.click(await workbenchPage.NavigationPanel.myRedisDBButton);
84+
await t.wait(5_000);
85+
await t.click(workbenchPage.NavigationPanel.myRedisDBButton);
7986
await t.expect(browserPage.notification.exists).notOk({ timeout: 10000 });
80-
await t.expect(await myRedisDatabasePage.dbNameList.child('span').withExactText(databaseName).count).eql(2, 'the same db is added twice');
87+
await t.expect(myRedisDatabasePage.dbNameList.child('span').withExactText(databaseName).count).eql(2, 'the same db is added twice');
8188
});
82-
83-
function generateLink(params: Record<string, any>): string {
84-
const params1 = Common.generateUrlTParams(params);
85-
const from = encodeURIComponent(`${redisConnect}?${params1}`);
86-
return (new URL(`?from=${from}`, commonUrl)).toString();
87-
}
88-

0 commit comments

Comments
 (0)