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
2 changes: 1 addition & 1 deletion tests/e2e/helpers/conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const cloudDatabaseConfig = {

export const ossStandaloneNoPermissionsConfig = {
host: process.env.OSS_STANDALONE_HOST || 'oss-standalone',
port: process.env.OSS_STANDALONE_PORT = '6379' || '6379',
port: process.env.OSS_STANDALONE_PORT || '6379',
databaseName: `${process.env.OSS_STANDALONE_DATABASE_NAME || 'oss-standalone-no-permissions'}-${uniqueId}`,
databaseUsername: process.env.OSS_STANDALONE_USERNAME || 'noperm',
databasePassword: process.env.OSS_STANDALONE_PASSWORD
Expand Down
1 change: 0 additions & 1 deletion tests/e2e/helpers/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export async function addNewStandaloneDatabase(databaseParameters: AddNewDatabas
//Click for saving
await t.click(addRedisDatabasePage.addRedisDatabaseButton);
//Wait for database to be exist
await t.expect(addRedisDatabasePage.errorMessage.exists).notOk(`The error message is not displyed after add the ${databaseParameters.databaseName}`);
await t.expect(myRedisDatabasePage.dbNameList.withExactText(databaseParameters.databaseName).exists).ok('The existence of the database', { timeout: 10000 });
//Close message
await t.click(myRedisDatabasePage.toastCloseButton);
Expand Down
25 changes: 8 additions & 17 deletions tests/e2e/tests/regression/monitor/monitor.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@ fixture `Monitor`
.afterEach(async() => {
//Delete database
await deleteDatabase(ossStandaloneConfig.databaseName);
})
});
test
.meta({ rte: rte.standalone })
('Verify that when user closes the Monitor by clicking on "Close Monitor" button Monitor stopped', async t => {
.meta({ rte: rte.standalone })('Verify that when user closes the Monitor by clicking on "Close Monitor" button Monitor stopped', async t => {
//Run monitor
await monitorPage.startMonitor();
//Close Monitor
Expand All @@ -47,8 +46,7 @@ test
await t.expect(monitorPage.startMonitorButton.visible).ok('Start profiler button');
});
test
.meta({ rte: rte.standalone })
('Verify that Monitor is stopped when user clicks on "Stop" button', async t => {
.meta({ rte: rte.standalone })('Verify that Monitor is stopped when user clicks on "Stop" button', async t => {
//Run monitor
await monitorPage.startMonitor();
//Click on Stop Monitor button
Expand All @@ -59,8 +57,7 @@ test
await t.expect(monitorPage.monitorIsStoppedText.nextSibling().exists).notOk('No commands in monitor');
});
test
.meta({ rte: rte.standalone })
('Verify that when user refreshes the page the list of results in Monitor is not saved', async t => {
.meta({ rte: rte.standalone })('Verify that when user refreshes the page the list of results in Monitor is not saved', async t => {
//Run monitor
await monitorPage.startMonitor();
//Refresh the page
Expand All @@ -72,8 +69,7 @@ test
await t.expect(monitorPage.monitorWarningMessage.exists).ok('Warning message in monitor');
});
test
.meta({ rte: rte.standalone })
('Verify that when user clicks on "Clear" button in Monitor, all commands history is removed', async t => {
.meta({ rte: rte.standalone })('Verify that when user clicks on "Clear" button in Monitor, all commands history is removed', async t => {
//Run monitor
await monitorPage.startMonitor();
//Stop Monitor
Expand All @@ -99,12 +95,11 @@ test
await settingsPage.changeKeysToScanValue('10000');
//Delete database
await deleteDatabase(ossStandaloneBigConfig.databaseName);
})
('Verify that user can see monitor results in high DB load', async t => {
})('Verify that user can see monitor results in high DB load', async t => {
//Run monitor
await monitorPage.startMonitor();
//Search by not existed key pattern
await browserPage.searchByKeyName(`${chance.string({ length:10 })}*`);
await browserPage.searchByKeyName(`${chance.string({ length: 10 })}*`);
//Check that the last child is updated
for (let i = 0; i <= 10; i++) {
const previousTimestamp = await monitorPage.monitorCommandLineTimestamp.nth(-1).textContent;
Expand All @@ -116,16 +111,13 @@ test
test
.meta({ rte: rte.standalone })
.before(async t => {
console.log('Before acceptLicenseTermsAndAddDatabase function');
await acceptLicenseTermsAndAddDatabase(ossStandaloneConfig, ossStandaloneConfig.databaseName);
console.log('After acceptLicenseTermsAndAddDatabase function');
await cliPage.sendCommandInCli('acl setuser noperm nopass on +@all ~* -monitor');
//Check command result in CLI
await t.click(cliPage.cliExpandButton);
await t.expect(cliPage.cliOutputResponseSuccess.textContent).eql('"OK"', 'Command from autocomplete was found & executed');
await t.click(cliPage.cliCollapseButton);
await deleteDatabase(ossStandaloneConfig.databaseName);
console.log('Before addNewStandaloneDatabase function with no permissions');
await addNewStandaloneDatabase(ossStandaloneNoPermissionsConfig);
await myRedisDatabasePage.clickOnDBByName(ossStandaloneNoPermissionsConfig.databaseName);
})
Expand All @@ -134,8 +126,7 @@ test
await cliPage.sendCommandInCli('acl DELUSER noperm');
//Delete database
await deleteDatabase(ossStandaloneNoPermissionsConfig.databaseName);
})
('Verify that if user doesn\'t have permissions to run monitor, user can see error message', async t => {
})('Verify that if user doesn\'t have permissions to run monitor, user can see error message', async t => {
//Expand the Profiler
await t.click(monitorPage.expandMonitor);
//Click on run monitor button
Expand Down