@@ -136,24 +136,25 @@ describe('FeatureSet - Server-All Auto Creation', () => {
136136 } ) ;
137137
138138 it ( 'TC-FS-004: Disable server and verify FeatureSet is hidden' , async ( ) => {
139- // Aggressively dismiss any open modal/panel - press Escape multiple times
140- await browser . keys ( 'Escape' ) ;
141- await browser . pause ( 300 ) ;
142- await browser . keys ( 'Escape' ) ;
143- await browser . pause ( 500 ) ;
144-
145- // Click outside any potential modal to dismiss it
146- const body = await $ ( 'body' ) ;
147- await body . click ( { x : 10 , y : 10 } ) ;
148- await browser . pause ( 500 ) ;
139+ // Close the FeatureSet detail panel if open (from previous test)
140+ // First try clicking the panel close button
141+ const panelCloseBtn = await byTestId ( 'featureset-panel-close' ) ;
142+ if ( await panelCloseBtn . isDisplayed ( ) . catch ( ( ) => false ) ) {
143+ console . log ( '[TC-FS-004] Clicking panel close button' ) ;
144+ await panelCloseBtn . click ( ) ;
145+ await browser . pause ( 500 ) ;
146+ } else {
147+ // Try clicking the overlay to close
148+ const overlay = await byTestId ( 'featureset-panel-overlay' ) ;
149+ if ( await overlay . isDisplayed ( ) . catch ( ( ) => false ) ) {
150+ console . log ( '[TC-FS-004] Clicking panel overlay to close' ) ;
151+ await overlay . click ( ) ;
152+ await browser . pause ( 500 ) ;
153+ }
154+ }
149155
150156 const myServersButton = await byTestId ( 'nav-my-servers' ) ;
151- // Try clicking even if not fully "clickable" - force the click
152- try {
153- await myServersButton . waitForClickable ( { timeout : TIMEOUT . short } ) ;
154- } catch {
155- console . log ( '[TC-FS-004] Nav button not clickable, trying force click' ) ;
156- }
157+ await myServersButton . waitForClickable ( { timeout : TIMEOUT . medium } ) ;
157158 await myServersButton . click ( ) ;
158159 await browser . pause ( 2000 ) ;
159160
@@ -180,24 +181,15 @@ describe('FeatureSet - Server-All Auto Creation', () => {
180181 } ) ;
181182
182183 it ( 'Cleanup: Uninstall Echo Server' , async ( ) => {
183- // Aggressively dismiss any open modal/panel
184- await browser . keys ( 'Escape' ) ;
185- await browser . pause ( 300 ) ;
186- await browser . keys ( 'Escape' ) ;
187- await browser . pause ( 500 ) ;
188-
189- // Click outside any potential modal to dismiss it
190- const body = await $ ( 'body' ) ;
191- await body . click ( { x : 10 , y : 10 } ) ;
192- await browser . pause ( 500 ) ;
184+ // Close any open panel first
185+ const panelCloseBtn = await byTestId ( 'featureset-panel-close' ) ;
186+ if ( await panelCloseBtn . isDisplayed ( ) . catch ( ( ) => false ) ) {
187+ await panelCloseBtn . click ( ) ;
188+ await browser . pause ( 500 ) ;
189+ }
193190
194191 const discoverButton = await byTestId ( 'nav-discover' ) ;
195- // Try clicking even if not fully "clickable"
196- try {
197- await discoverButton . waitForClickable ( { timeout : TIMEOUT . short } ) ;
198- } catch {
199- console . log ( '[Cleanup] Nav button not clickable, trying force click' ) ;
200- }
192+ await discoverButton . waitForClickable ( { timeout : TIMEOUT . medium } ) ;
201193 await discoverButton . click ( ) ;
202194 await browser . pause ( 2000 ) ;
203195
0 commit comments