@@ -185,7 +185,7 @@ export async function acceptLicenseTermsAndAddRECloudDatabase(databaseParameters
185
185
await addRedisDatabasePage . addRedisDataBase ( databaseParameters ) ;
186
186
// Click for saving
187
187
await t . click ( addRedisDatabasePage . addRedisDatabaseButton ) ;
188
- await t . wait ( 2000 ) ;
188
+ await t . wait ( 3000 ) ;
189
189
// Reload page until db appears
190
190
do {
191
191
await common . reloadPage ( ) ;
@@ -196,6 +196,27 @@ export async function acceptLicenseTermsAndAddRECloudDatabase(databaseParameters
196
196
await t . expect ( browserPage . keysSummary . exists ) . ok ( 'Key list not loaded' , { timeout : 15000 } ) ;
197
197
}
198
198
199
+ /**
200
+ * Add RE Cloud database
201
+ * @param databaseParameters The database parameters
202
+ */
203
+ export async function addRECloudDatabase ( databaseParameters : AddNewDatabaseParameters ) : Promise < void > {
204
+ const searchTimeout = 60 * 1000 ; // 60 sec to wait database appearing
205
+ const dbSelector = myRedisDatabasePage . dbNameList . withExactText ( databaseParameters . databaseName ?? '' ) ;
206
+ const startTime = Date . now ( ) ;
207
+
208
+ await addRedisDatabasePage . addRedisDataBase ( databaseParameters ) ;
209
+ // Click for saving
210
+ await t . click ( addRedisDatabasePage . addRedisDatabaseButton ) ;
211
+ await t . wait ( 3000 ) ;
212
+ // Reload page until db appears
213
+ do {
214
+ await common . reloadPage ( ) ;
215
+ }
216
+ while ( ! ( await dbSelector . exists ) && Date . now ( ) - startTime < searchTimeout ) ;
217
+ await t . expect ( myRedisDatabasePage . dbNameList . withExactText ( databaseParameters . databaseName ?? '' ) . exists ) . ok ( 'The database not displayed' , { timeout : 5000 } ) ;
218
+ }
219
+
199
220
// Accept License terms
200
221
export async function acceptLicenseTerms ( ) : Promise < void > {
201
222
await t . maximizeWindow ( ) ;
0 commit comments