Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ test
.after(async() => {
// Delete all auto-discovered databases
for(let i = 0; i < standalonePorts.length; i++) {
await myRedisDatabasePage.deleteDatabaseByName(`localhost:${standalonePorts[i]}`);
await myRedisDatabasePage.deleteDatabaseByName(`127.0.0.1:${standalonePorts[i]}`);
}
})('Verify that when users open application for the first time, they can see all auto-discovered Standalone DBs', async t => {
// Check that standalone DBs have been added into the application
Expand All @@ -29,11 +29,12 @@ test
const name = await myRedisDatabasePage.dbNameList.nth(k).textContent;
console.log(`AUTODISCOVERY ${k}: ${name}`);
}
// Verify that user can see all the databases automatically discovered with 127.0.0.1 host instead of localhost
for(let i = 0; i < standalonePorts.length; i++) {
await t.expect(myRedisDatabasePage.dbNameList.withExactText(`localhost:${standalonePorts[i]}`).exists).ok('Standalone DBs');
await t.expect(myRedisDatabasePage.dbNameList.withExactText(`127.0.0.1:${standalonePorts[i]}`).exists).ok('Standalone DBs');
}
// Check that Sentinel and OSS cluster have not been added into the application
for(let j = 0; j < otherPorts.length; j++) {
await t.expect(myRedisDatabasePage.dbNameList.withExactText(`localhost:${otherPorts[j]}`).exists).notOk('Sentinel and OSS DBs');
await t.expect(myRedisDatabasePage.dbNameList.withExactText(`127.0.0.1:${otherPorts[j]}`).exists).notOk('Sentinel and OSS DBs');
}
});
23 changes: 23 additions & 0 deletions tests/e2e/tests/critical-path/database/connecting-to-the-db.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,26 @@ test
await t.expect(addRedisDatabasePage.errorMessage.textContent).contains('Error', 'Error message not displayed', { timeout: 10000 });
await t.expect(addRedisDatabasePage.errorMessage.textContent).contains(errorMessage, 'Error message not displayed', { timeout: 10000 });
});
test
.meta({ rte: rte.none })('Fields to add database prepopulation', async t => {
const defaultHost = '127.0.0.1';
const defaultPort = '6379';
const defaultSentinelPort = '26379';

await t
.click(addRedisDatabasePage.addDatabaseButton)
.click(addRedisDatabasePage.addDatabaseManually);
// Verify that the Host, Port, Database Alias values pre-populated by default for the manual flow
await t
.expect(addRedisDatabasePage.hostInput.value).eql(defaultHost, 'Default host not prepopulated')
.expect(addRedisDatabasePage.portInput.value).eql(defaultPort, 'Default port not prepopulated')
.expect(addRedisDatabasePage.databaseAliasInput.value).eql(`${defaultHost}:${defaultPort}`, 'Default db alias not prepopulated');
// Verify that the Host, Port, Database Alias values pre-populated by default for Sentinel
await t
.click(addRedisDatabasePage.addAutoDiscoverDatabase)
.click(addRedisDatabasePage.redisSentinelType);
await t
.expect(addRedisDatabasePage.hostInput.value).eql(defaultHost, 'Default sentinel host not prepopulated')
.expect(addRedisDatabasePage.portInput.value).eql(defaultSentinelPort, 'Default sentinel port not prepopulated');

});