@@ -180,7 +180,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
180180 const longLabel =
181181 'Veryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryvery long label wrapping multiple lines' ;
182182 await PageObjects . lens . editDimensionLabel ( longLabel ) ;
183- await PageObjects . header . waitUntilLoadingHasFinished ( ) ;
183+ await PageObjects . lens . waitForVisualization ( ) ;
184184 await PageObjects . lens . closeDimensionEditor ( ) ;
185185
186186 expect ( await PageObjects . lens . getDimensionTriggerText ( 'lnsXY_yDimensionPanel' ) ) . to . eql (
@@ -223,7 +223,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
223223
224224 await PageObjects . lens . closeDimensionEditor ( ) ;
225225
226- await PageObjects . header . waitUntilLoadingHasFinished ( ) ;
226+ await PageObjects . lens . waitForVisualization ( ) ;
227227
228228 const data = await PageObjects . lens . getCurrentChartDebugState ( ) ;
229229 expect ( data ?. axes ?. y . length ) . to . eql ( 2 ) ;
@@ -235,15 +235,15 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
235235 await PageObjects . lens . toggleToolbarPopover ( 'lnsValuesButton' ) ;
236236 await testSubjects . click ( 'lnsXY_valueLabels_inside' ) ;
237237
238- await PageObjects . header . waitUntilLoadingHasFinished ( ) ;
238+ await PageObjects . lens . waitForVisualization ( ) ;
239239
240240 // check for value labels
241241 let data = await PageObjects . lens . getCurrentChartDebugState ( ) ;
242242 expect ( data ?. bars ?. [ 0 ] . labels ) . not . to . eql ( 0 ) ;
243243
244244 // switch to stacked bar chart
245245 await PageObjects . lens . switchToVisualization ( 'bar_stacked' ) ;
246- await PageObjects . header . waitUntilLoadingHasFinished ( ) ;
246+ await PageObjects . lens . waitForVisualization ( ) ;
247247
248248 // check for value labels
249249 data = await PageObjects . lens . getCurrentChartDebugState ( ) ;
@@ -256,14 +256,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
256256 await testSubjects . setValue ( 'lnsyLeftAxisTitle' , axisTitle , {
257257 clearWithKeyboard : true ,
258258 } ) ;
259- await PageObjects . header . waitUntilLoadingHasFinished ( ) ;
259+ await PageObjects . lens . waitForVisualization ( ) ;
260260
261261 let data = await PageObjects . lens . getCurrentChartDebugState ( ) ;
262262 expect ( data ?. axes ?. y ?. [ 0 ] . title ) . to . eql ( axisTitle ) ;
263263
264264 // hide the gridlines
265265 await testSubjects . click ( 'lnsshowyLeftAxisGridlines' ) ;
266- await PageObjects . header . waitUntilLoadingHasFinished ( ) ;
266+ await PageObjects . lens . waitForVisualization ( ) ;
267267
268268 data = await PageObjects . lens . getCurrentChartDebugState ( ) ;
269269 expect ( data ?. axes ?. y ?. [ 0 ] . gridlines . length ) . to . eql ( 0 ) ;
0 commit comments