@@ -73,16 +73,20 @@ export function runDevModeTestSuite(config: DevModeConfig): void {
7373 logger . testStart ( 'Liberty Tools shows items - Maven' ) ;
7474 try {
7575 logger . step ( 1 , 'Getting dashboard section' ) ;
76- const section = await dashboard . getSection ( ) ;
76+ const section = await dashboard . getSection ( ) ;
7777 logger . stepSuccess ( 1 , 'Dashboard section retrieved' ) ;
7878
7979 logger . step ( 2 , 'Waiting for Liberty Tools to load' ) ;
8080 await utils . waitForDashboardToLoad ( section ) ;
8181 logger . stepSuccess ( 2 , 'Liberty Tools loaded successfully' ) ;
8282
83+ // waitForDashboardToLoad already confirmed items exist on a fresh
84+ // section reference. Re-fetch here so getVisibleItems() doesn't
85+ // operate on the original stale reference from before the wait.
8386 logger . step ( 3 , 'Getting visible items from section' ) ;
87+ const freshSection = await dashboard . getSection ( ) ;
8488 const menu = await utils . waitForCondition ( async ( ) => {
85- const items = await section . getVisibleItems ( ) ;
89+ const items = await freshSection . getVisibleItems ( ) ;
8690 if ( items && items . length > 0 ) {
8791 return items ;
8892 }
@@ -92,7 +96,7 @@ export function runDevModeTestSuite(config: DevModeConfig): void {
9296 expect ( menu ) . not . empty ;
9397
9498 logger . step ( 4 , `Finding Maven project item: ${ config . projectConstant } ` ) ;
95- const item = await dashboard . getProjectItem ( config . projectConstant ) ;
99+ const item = await dashboard . getProjectItem ( config . projectConstant ) ;
96100 logger . stepSuccess ( 4 , 'Maven project item found' ) ;
97101 expect ( item ) . not . undefined ;
98102
@@ -101,7 +105,7 @@ export function runDevModeTestSuite(config: DevModeConfig): void {
101105 logger . testFailed ( `Liberty Tools shows items - ${ config . buildTool } ` , error ) ;
102106 throw error ;
103107 }
104- } ) . timeout ( 275000 ) ;
108+ } ) . timeout ( 360000 ) ;
105109
106110 it ( `Start ${ config . buildTool } project from Liberty Tools` , async ( ) => {
107111 logger . testStart ( 'Start Maven project from Liberty Tools' ) ;
0 commit comments