@@ -76,12 +76,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
7676 hideTimeFieldColumnSetting || ! hasTimeField ? [ 'Summary' ] : [ '@timestamp' , 'Summary' ]
7777 ) ;
7878 await discover . saveSearch ( `${ SEARCH_NO_COLUMNS } ${ savedSearchSuffix } ` ) ;
79- await discover . waitUntilSearchingHasFinished ( ) ;
79+ await discover . waitUntilTabIsLoaded ( ) ;
8080
8181 const isTimestampUnavailableInSidebar = isEsqlMode && ! hasTimeField ;
8282 if ( ! isTimestampUnavailableInSidebar ) {
8383 await unifiedFieldList . clickFieldListItemAdd ( '@timestamp' ) ;
84- await discover . waitUntilSearchingHasFinished ( ) ;
84+ await discover . waitUntilTabIsLoaded ( ) ;
8585 await retry . try ( async ( ) => {
8686 expect ( await dataGrid . getHeaderFields ( ) ) . to . eql (
8787 ! hasTimeField
@@ -93,7 +93,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
9393 } ) ;
9494
9595 await discover . saveSearch ( `${ SEARCH_WITH_ONLY_TIMESTAMP } ${ savedSearchSuffix } ` , true ) ;
96- await discover . waitUntilSearchingHasFinished ( ) ;
96+ await discover . waitUntilTabIsLoaded ( ) ;
9797
9898 await unifiedFieldList . clickFieldListItemRemove ( '@timestamp' ) ;
9999 await retry . try ( async ( ) => {
@@ -161,7 +161,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
161161 } ) ;
162162
163163 await discover . saveSearch ( `${ SEARCH_WITH_SELECTED_COLUMNS } ${ savedSearchSuffix } ` ) ;
164- await discover . waitUntilSearchingHasFinished ( ) ;
164+ await discover . waitUntilTabIsLoaded ( ) ;
165165
166166 await unifiedFieldList . clickFieldListItemAdd ( '@timestamp' ) ;
167167 await retry . try ( async ( ) => {
@@ -172,7 +172,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
172172 `${ SEARCH_WITH_SELECTED_COLUMNS_AND_TIMESTAMP } ${ savedSearchSuffix } ` ,
173173 true
174174 ) ;
175- await discover . waitUntilSearchingHasFinished ( ) ;
175+ await discover . waitUntilTabIsLoaded ( ) ;
176176
177177 await dataGrid . clickMoveColumnLeft ( '@timestamp' ) ;
178178 await retry . try ( async ( ) => {
@@ -237,7 +237,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
237237 'doc_table:hideTimeColumn' : hideTimeFieldColumnSetting ,
238238 } ) ;
239239 await common . navigateToApp ( 'discover' ) ;
240- await discover . waitUntilSearchingHasFinished ( ) ;
240+ await discover . waitUntilTabIsLoaded ( ) ;
241241 } ) ;
242242
243243 describe ( 'data view mode' , ( ) => {
@@ -266,7 +266,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
266266 adHoc : true ,
267267 hasTimeField : false ,
268268 } ) ;
269- await discover . waitUntilSearchingHasFinished ( ) ;
269+ await discover . waitUntilTabIsLoaded ( ) ;
270270 } ) ;
271271
272272 it ( 'should render initial columns correctly' , async ( ) => {
@@ -290,6 +290,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
290290 describe ( 'ESQL mode' , ( ) => {
291291 it ( 'should render initial columns correctly' , async ( ) => {
292292 await discover . selectTextBaseLang ( ) ;
293+ await discover . waitUntilTabIsLoaded ( ) ;
293294
294295 await checkInitialColumns ( {
295296 hasTimeField : true ,
@@ -303,7 +304,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
303304 await discover . selectTextBaseLang ( ) ;
304305 await monacoEditor . setCodeEditorValue ( 'from logstash-* | limit 10 | drop @timestamp' ) ;
305306 await testSubjects . click ( 'querySubmitButton' ) ;
306- await header . waitUntilLoadingHasFinished ( ) ;
307+ await discover . waitUntilTabIsLoaded ( ) ;
307308
308309 await checkInitialColumns ( {
309310 hasTimeField : false ,
@@ -315,6 +316,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
315316
316317 it ( 'should render selected columns correctly' , async ( ) => {
317318 await discover . selectTextBaseLang ( ) ;
319+ await discover . waitUntilTabIsLoaded ( ) ;
318320
319321 await checkSelectedColumns ( {
320322 hasTimeField : true ,
0 commit comments