@@ -233,3 +233,37 @@ test
233
233
await common . reloadPage ( ) ;
234
234
await t . expect ( browserPage . keyListTable . textContent ) . contains ( notSelectedIndexText , 'Search by Values of Keys section not opened' ) ;
235
235
} ) ;
236
+ test
237
+ . before ( async ( ) => {
238
+ await acceptLicenseTermsAndAddDatabaseApi ( ossStandaloneBigConfig , ossStandaloneBigConfig . databaseName ) ;
239
+ indexName = common . generateWord ( 10 ) ;
240
+ const command = `FT.CREATE ${ indexName } ON hash SCHEMA "" text` ;
241
+ await cliPage . sendCommandInCli ( command ) ;
242
+ } )
243
+ . after ( async ( ) => {
244
+ // Drop index
245
+ await cliPage . sendCommandInCli ( `FT.DROPINDEX ${ indexName } ` ) ;
246
+ // Delete database
247
+ await deleteStandaloneDatabaseApi ( ossStandaloneBigConfig ) ;
248
+ } ) ( 'Scan more Redisearch' , async t => {
249
+ const commandToChangeMaxSearchResults = 'FT.CONFIG SET maxsearchresults 30000' ;
250
+
251
+ await cliPage . sendCommandInCli ( commandToChangeMaxSearchResults ) ;
252
+ await t . click ( browserPage . redisearchModeBtn ) ;
253
+
254
+ // Verify that user can not see the “Scan more” button in Browser
255
+ await t . expect ( browserPage . scanMoreButton . exists ) . notOk ( 'Scan More button is displayed in Browser' ) ;
256
+
257
+ // Verify that user can see the “Scan more” button in the Tree View if the number of scanned keys is less than maxsearchresults
258
+ await t . click ( browserPage . treeViewButton ) ;
259
+ await browserPage . selectIndexByName ( indexName ) ;
260
+ for ( let i = 0 ; i < 2 ; i ++ ) {
261
+ await t . expect ( browserPage . scanMoreButton . exists ) . ok ( 'Scan More button is not displayed' ) ;
262
+ await t . click ( browserPage . scanMoreButton ) ;
263
+ await t . expect ( browserPage . scannedValue . textContent ) . eql ( `${ i + 2 } 0 000` ) ;
264
+ await t . expect ( browserPage . keysNumberOfResults . textContent ) . eql ( `${ i + 2 } 0 000` ) ;
265
+ }
266
+
267
+ // Verify that user cannot see the “Scan more” button in the Tree view if there limited number is riched
268
+ await t . expect ( browserPage . scanMoreButton . exists ) . notOk ( 'Scan More button is displayed' ) ;
269
+ } ) ;
0 commit comments