Skip to content

Commit 6a97a8e

Browse files
Merge pull request #2583 from RedisInsight/e2e/bugfix/add_database_auto_discovery
fix for regression test
2 parents 652b114 + 13eed51 commit 6a97a8e

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

tests/e2e/tests/smoke/database/autodiscover-db.e2e.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ import {
66
cloudDatabaseConfig
77
} from '../../../helpers/conf';
88
import { rte } from '../../../helpers/constants';
9-
import { MyRedisDatabasePage } from '../../../pageObjects';
9+
import { AutoDiscoverREDatabases, MyRedisDatabasePage } from '../../../pageObjects';
1010

1111
const myRedisDatabasePage = new MyRedisDatabasePage();
12+
const autoDiscoverREDatabases = new AutoDiscoverREDatabases();
1213
const databaseHelper = new DatabaseHelper();
1314

14-
let databaseName: string;
15-
1615
fixture `Add database`
1716
.meta({ type: 'smoke' })
1817
.page(commonUrl)
@@ -44,11 +43,15 @@ test
4443
.meta({ rte: rte.reCloud })
4544
.after(async() => {
4645
// await deleteDatabase(databaseName);
47-
})('Verify that user can connect to the RE Cloud database via auto-discover flow', async t => {
46+
})('Verify that user can add a subscription via auto-discover flow', async t => {
4847
// Verify that user can see the Cloud auto-discovery option selected by default when switching to the auto-discovery of databases
49-
databaseName = await databaseHelper.autodiscoverRECloudDatabase(cloudDatabaseConfig.accessKey, cloudDatabaseConfig.secretKey);
50-
// uncomment when fixed db will be added to cloud subscription
51-
// await myRedisDatabasePage.clickOnDBByName(databaseName);
52-
// // Verify that user can add database from fixed subscription
53-
// await t.expect(Common.getPageUrl()).contains('browser', 'The added RE Cloud database not opened');
48+
await t.click(
49+
myRedisDatabasePage.AddRedisDatabase.addRedisDatabaseButton);
50+
await t.expect(autoDiscoverREDatabases.title.withExactText('Redis Enterprise Cloud Subscriptions').exists)
51+
.ok('Subscriptions list not displayed', { timeout: 120000 });
52+
// Select subscriptions
53+
await t.click(myRedisDatabasePage.AddRedisDatabase.selectAllCheckbox);
54+
await t.click(myRedisDatabasePage.AddRedisDatabase.showDatabasesButton);
55+
await t.expect(autoDiscoverREDatabases.title.withExactText('Redis Enterprise Cloud Databases').exists)
56+
.ok('database page is not displayed', { timeout: 120000 });
5457
});

0 commit comments

Comments
 (0)