@@ -83,6 +83,9 @@ describe("Command Tests", function() {
8383 await openProject ( mavenProjectPath ) ;
8484 await openFile ( mavenJavaFilePath ) ;
8585 await waitForLanguageServerReady ( ) ;
86+ // Close any lingering hover popup (e.g. language status) that could overlay the sidebar
87+ await VSBrowser . instance . driver . actions ( ) . sendKeys ( seleniumWebdriver . Key . ESCAPE ) . perform ( ) ;
88+ await clearNotificationsIfPresent ( ) ;
8689 } ) ;
8790
8891 after ( async function ( ) {
@@ -175,6 +178,8 @@ describe("Command Tests", function() {
175178 } ) ;
176179
177180 ( platform ( ) === "darwin" ? it . skip : it ) ( "Test java.view.package.revealInProjectExplorer" , async function ( ) {
181+ await dismissModalDialogIfPresent ( ) ;
182+ await clearNotificationsIfPresent ( ) ;
178183 // Make sure App.java is not currently revealed in Java Projects
179184 const section = await new SideBarView ( ) . getContent ( ) . getSection ( "Java Projects" ) ;
180185 const item = await section . findItem ( "my-app" ) as TreeItem ;
@@ -334,6 +339,8 @@ async function collapseFileSection() {
334339}
335340
336341async function expandMainCodeInJavaProjects ( ) {
342+ await dismissModalDialogIfPresent ( ) ;
343+ await clearNotificationsIfPresent ( ) ;
337344 const section = await new SideBarView ( ) . getContent ( ) . getSection ( "Java Projects" ) ;
338345 await section . click ( ) ;
339346 const appNode = await section . findItem ( "my-app" ) as TreeItem ;
@@ -348,6 +355,8 @@ async function expandMainCodeInJavaProjects() {
348355async function expandInJavaProjects ( label : string , ...otherLabels : string [ ] ) : Promise < [ TreeItem , ViewSection ] > {
349356 // Dismiss any lingering modal dialog that could block sidebar clicks
350357 await dismissModalDialogIfPresent ( ) ;
358+ // Clear notification toasts that could overlay sidebar elements
359+ await clearNotificationsIfPresent ( ) ;
351360 // Collapse file section to make sure that the AppToRename tree item fits in the current viewport.
352361 // .findItem will only find tree items in the current viewport.
353362 await collapseFileSection ( ) ;
@@ -427,6 +436,16 @@ async function dismissModalDialogIfPresent() {
427436 }
428437}
429438
439+ async function clearNotificationsIfPresent ( ) {
440+ try {
441+ const center = await new Workbench ( ) . openNotificationsCenter ( ) ;
442+ await center . clearAllNotifications ( ) ;
443+ await center . close ( ) ;
444+ } catch ( _e ) {
445+ // No notifications or center not available — nothing to clear
446+ }
447+ }
448+
430449async function waitForTreeItem ( section : ViewSection , label : string , timeoutMs = 15000 ) : Promise < TreeItem | undefined > {
431450 const start = Date . now ( ) ;
432451 while ( Date . now ( ) - start < timeoutMs ) {
0 commit comments