@@ -230,6 +230,48 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
230230 } ) ;
231231 } ) ;
232232
233+ it ( 'should show value labels on bar charts when enabled' , async ( ) => {
234+ // enable value labels
235+ await PageObjects . lens . toggleToolbarPopover ( 'lnsValuesButton' ) ;
236+ await testSubjects . click ( 'lnsXY_valueLabels_inside' ) ;
237+
238+ // check for value labels
239+ await retry . tryForTime ( 3000 , async ( ) => {
240+ const data = await PageObjects . lens . getCurrentChartDebugState ( ) ;
241+ expect ( data ?. bars ?. [ 0 ] . labels ) . not . to . eql ( 0 ) ;
242+ } ) ;
243+
244+ // switch to stacked bar chart
245+ await PageObjects . lens . switchToVisualization ( 'bar_stacked' ) ;
246+
247+ // check for value labels
248+ await retry . tryForTime ( 3000 , async ( ) => {
249+ const data = await PageObjects . lens . getCurrentChartDebugState ( ) ;
250+ expect ( data ?. bars ?. [ 0 ] . labels . length ) . to . eql ( 0 ) ;
251+ } ) ;
252+ } ) ;
253+
254+ it ( 'should override axis title' , async ( ) => {
255+ const axisTitle = 'overridden axis' ;
256+ await PageObjects . lens . toggleToolbarPopover ( 'lnsLeftAxisButton' ) ;
257+ await testSubjects . setValue ( 'lnsyLeftAxisTitle' , axisTitle , {
258+ clearWithKeyboard : true ,
259+ } ) ;
260+
261+ await retry . tryForTime ( 3000 , async ( ) => {
262+ const data = await PageObjects . lens . getCurrentChartDebugState ( ) ;
263+ expect ( data ?. axes ?. y ?. [ 0 ] . title ) . to . eql ( axisTitle ) ;
264+ } ) ;
265+
266+ // hide the gridlines
267+ await testSubjects . click ( 'lnsshowyLeftAxisGridlines' ) ;
268+
269+ await retry . tryForTime ( 3000 , async ( ) => {
270+ const data = await PageObjects . lens . getCurrentChartDebugState ( ) ;
271+ expect ( data ?. axes ?. y ?. [ 0 ] . gridlines . length ) . to . eql ( 0 ) ;
272+ } ) ;
273+ } ) ;
274+
233275 it ( 'should transition from a multi-layer stacked bar to donut chart using suggestions' , async ( ) => {
234276 await PageObjects . visualize . navigateToNewVisualization ( ) ;
235277 await PageObjects . visualize . clickVisType ( 'lens' ) ;
0 commit comments