@@ -71,7 +71,7 @@ test.describe("Widget Functionality", () => {
7171 } ) ;
7272
7373 // Test Cluster Apply button WITHOUT the wait_ready checkbox checked
74- // This avoids the 300s TLS timeout + dashboard_check issues in KinD
74+ // This avoids the long TLS timeout + dashboard_check issues in KinD
7575 await interactWithWidget ( page , applyDownWidgetCellIndex , 'button:has-text("Cluster Apply")' , async ( button ) => {
7676 await button . click ( ) ;
7777
@@ -81,6 +81,10 @@ test.describe("Widget Functionality", () => {
8181 expect ( successMessage ) . not . toBeNull ( ) ;
8282 } ) ;
8383
84+ // Wait for apply() to complete (widget uses 60s TLS timeout)
85+ // We wait for either success or failure message from the TLS setup phase
86+ await page . waitForSelector ( 'text=/Cluster .widgettest. (is ready|resources applied but TLS setup incomplete)/' , { timeout : 90000 } ) ;
87+
8488 // Test view_clusters widget
8589 const viewClustersCellIndex = 4 ; // 5 on OpenShift
8690 await page . notebook . runCell ( cellCount - 2 , true ) ;
@@ -104,8 +108,8 @@ test.describe("Widget Functionality", () => {
104108 // Test Delete Cluster button to clean up
105109 await interactWithWidget ( page , viewClustersCellIndex , 'button:has-text("Delete Cluster")' , async ( button ) => {
106110 await button . click ( ) ;
107- // Wait for deletion confirmation
108- const successMessage = await page . waitForSelector ( `text=Cluster widgettest in the ${ namespace } namespace was deleted successfully.` , { timeout : 10000 } ) ;
111+ // Wait for deletion confirmation - increase timeout as cluster deletion can take time
112+ const successMessage = await page . waitForSelector ( `text=Cluster widgettest in the ${ namespace } namespace was deleted successfully.` , { timeout : 30000 } ) ;
109113 expect ( successMessage ) . not . toBeNull ( ) ;
110114 } ) ;
111115 } ) ;
0 commit comments