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
18 changes: 10 additions & 8 deletions tests/e2e/helpers/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ export async function addNewStandaloneDatabase(databaseParameters: AddNewDatabas
//Click for saving
await t.click(addRedisDatabasePage.addRedisDatabaseButton);
//Wait for database to be exist
await t.expect(myRedisDatabasePage.dbNameList.withExactText(databaseParameters.databaseName).exists).ok('The existence of the database', { timeout: 60000 });
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 Expand Up @@ -102,6 +104,13 @@ export async function addNewRECloudDatabase(cloudAPIAccessKey: string, cloudAPIS
return databaseName;
}

//Accept License terms
export async function acceptLicenseTerms(): Promise<void> {
await t.maximizeWindow();
await userAgreementPage.acceptLicenseTerms();
await t.expect(addRedisDatabasePage.addDatabaseButton.exists).ok('The add redis database view', {timeout: 20000});
}

/**
* Accept License terms and add database
* @param databaseParameters The database parameters
Expand All @@ -126,13 +135,6 @@ export async function acceptLicenseTermsAndAddOSSClusterDatabase(databaseParamet
await myRedisDatabasePage.clickOnDBByName(databaseName);
}

//Accept License terms
export async function acceptLicenseTerms(): Promise<void> {
await t.maximizeWindow();
await userAgreementPage.acceptLicenseTerms();
await t.expect(addRedisDatabasePage.addDatabaseButton.exists).ok('The add redis database view', {timeout: 20000});
}

//Clear database data
export async function clearDatabaseInCli(): Promise<void> {
if (await cliPage.cliCollapseButton.exists === false) {
Expand Down
Loading