|
34 | 34 | };
|
35 | 35 |
|
36 | 36 | await t.navigateTo(generateLink(connectUrlParams));
|
37 |
| - await t.expect(await myRedisDatabasePage.AddRedisDatabase.hostInput.getAttribute('value')).eql(host, 'Wrong host value'); |
38 |
| - await t.expect(await myRedisDatabasePage.AddRedisDatabase.portInput.getAttribute('value')).eql(port, 'Wrong port value'); |
| 37 | + await t.expect(await myRedisDatabasePage.AddRedisDatabase.disabledDatabaseInfo.nth(0).find('span').getAttribute('title')).contains(host, 'Wrong host value'); |
| 38 | + await t.expect(await myRedisDatabasePage.AddRedisDatabase.disabledDatabaseInfo.nth(1).find('span').getAttribute('title')).contains(port, 'Wrong port value'); |
39 | 39 | await t.click(await myRedisDatabasePage.AddRedisDatabase.addRedisDatabaseButton);
|
40 | 40 | // wait for db is added
|
41 | 41 | await t.wait(3_000);
|
|
61 | 61 | const connectUrlParams = {
|
62 | 62 | redisUrl: `redis://${databaseUsername}:${databasePassword}@${host}:${port}`,
|
63 | 63 | databaseAlias: databaseName,
|
64 |
| - redirect: 'workbench?guidePath=/quick-guides/document/introduction.md' |
| 64 | + redirect: 'workbench?guidePath=/quick-guides/document/introduction.md', |
| 65 | + cloudBdbId: '1232', |
| 66 | + subscriptionType: 'fixed', |
| 67 | + planMemoryLimit: '30', |
| 68 | + memoryLimitMeasurementUnit: 'mb', |
| 69 | + free: 'true' |
65 | 70 | };
|
66 | 71 |
|
67 | 72 | await t.navigateTo(generateLink(connectUrlParams));
|
68 | 73 | await t.wait(3_000);
|
69 | 74 | await t.expect(await workbenchPage.closeEnablementPage.exists).ok('Redirection to Workbench tutorial is not correct');
|
| 75 | + |
| 76 | + //Verify that the same db is not added |
| 77 | + await t.navigateTo(generateLink(connectUrlParams)); |
| 78 | + await t.wait(3_000); |
| 79 | + await t.click(await workbenchPage.NavigationPanel.myRedisDBButton); |
| 80 | + await t.expect(await myRedisDatabasePage.dbNameList.child('span').withExactText(databaseName).count).eql(2, 'the same db is added twice'); |
70 | 81 | });
|
71 | 82 |
|
72 | 83 | function generateLink(params: Record<string, any>): string {
|
|
0 commit comments