@@ -450,6 +450,49 @@ describe("Reorganize Pages View", () => {
450450 ) ;
451451 } ) ;
452452
453+ it ( "should check that find navigation is not blocked after moving pages (bug 2023150)" , async ( ) => {
454+ await Promise . all (
455+ pages . map ( async ( [ browserName , page ] ) => {
456+ await waitAndClick ( page , "#viewFindButton" ) ;
457+ await page . waitForSelector ( "#findInput" , { visible : true } ) ;
458+ await page . type ( "#findInput" , "1" ) ;
459+ await page . keyboard . press ( "Enter" ) ;
460+
461+ // Wait for the first result to be selected and the search to settle.
462+ await page . waitForSelector ( "#findInput[data-status='']" ) ;
463+ let resultEl = await page . waitForSelector ( "#findResultsCount" ) ;
464+ const firstResult = await resultEl . evaluate ( el => el . textContent ) ;
465+ expect ( firstResult )
466+ . withContext ( `In ${ browserName } ` )
467+ . toEqual ( `${ FSI } 1${ PDI } of ${ FSI } 10${ PDI } matches` ) ;
468+
469+ // Navigate to the next match.
470+ await page . keyboard . press ( "Enter" ) ;
471+ await page . waitForSelector ( "#findInput[data-status='']" ) ;
472+ resultEl = await page . waitForSelector ( "#findResultsCount" ) ;
473+ const secondResult = await resultEl . evaluate ( el => el . textContent ) ;
474+ expect ( secondResult )
475+ . withContext ( `In ${ browserName } ` )
476+ . toEqual ( `${ FSI } 2${ PDI } of ${ FSI } 10${ PDI } matches` ) ;
477+
478+ // Move a page: this previously blocked subsequent find navigation.
479+ await movePages ( page , [ 3 ] , 0 ) ;
480+
481+ // Wait for the search to re-run after the page move.
482+ await page . waitForSelector ( "#findInput[data-status='']" ) ;
483+
484+ // Navigate to the next match — must not be blocked.
485+ await page . keyboard . press ( "Enter" ) ;
486+ await page . waitForSelector ( "#findInput[data-status='']" ) ;
487+ resultEl = await page . waitForSelector ( "#findResultsCount" ) ;
488+ const resultAfterMove = await resultEl . evaluate ( el => el . textContent ) ;
489+ expect ( resultAfterMove )
490+ . withContext ( `In ${ browserName } ` )
491+ . not . toEqual ( secondResult ) ;
492+ } )
493+ ) ;
494+ } ) ;
495+
453496 it ( "should check if the search is working after copy and paste (bug 2023150)" , async ( ) => {
454497 await Promise . all (
455498 pages . map ( async ( [ browserName , page ] ) => {
0 commit comments