@@ -18,6 +18,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
1818
1919 describe ( 'dashboard data-shared attributes' , ( ) => {
2020 let originalTitles : string [ ] = [ ] ;
21+ let originalAccessibleTitles : string [ ] = [ ] ;
2122
2223 before ( async ( ) => {
2324 await esArchiver . load ( 'test/functional/fixtures/es_archiver/dashboard/current/kibana' ) ;
@@ -28,23 +29,32 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
2829 await PageObjects . dashboard . preserveCrossAppState ( ) ;
2930 await PageObjects . dashboard . loadSavedDashboard ( 'few panels' ) ;
3031 await PageObjects . dashboard . switchToEditMode ( ) ;
31- originalTitles = await PageObjects . dashboard . getPanelTitles ( ) ;
32+ originalTitles = await PageObjects . dashboard . getVisiblePanelTitles ( ) ;
33+ originalAccessibleTitles = await PageObjects . dashboard . getPanelTitles ( ) ;
3234 } ) ;
3335
3436 it ( 'should be able to hide all panel titles' , async ( ) => {
3537 await PageObjects . dashboard . checkHideTitle ( ) ;
3638 await retry . try ( async ( ) => {
37- const titles = await PageObjects . dashboard . getPanelTitles ( ) ;
39+ const titles = await PageObjects . dashboard . getVisiblePanelTitles ( ) ;
3840 expect ( titles [ 0 ] ) . to . eql ( '' ) ;
3941 } ) ;
4042 } ) ;
4143
4244 it ( 'should be able to unhide all panel titles' , async ( ) => {
4345 await PageObjects . dashboard . checkHideTitle ( ) ;
4446 await retry . try ( async ( ) => {
45- const titles = await PageObjects . dashboard . getPanelTitles ( ) ;
47+ const titles = await PageObjects . dashboard . getVisiblePanelTitles ( ) ;
4648 expect ( titles [ 0 ] ) . to . eql ( originalTitles [ 0 ] ) ;
4749 } ) ;
4850 } ) ;
51+
52+ it ( 'should always present accessible labels' , async ( ) => {
53+ await PageObjects . dashboard . checkHideTitle ( ) ;
54+ await retry . try ( async ( ) => {
55+ const titles = await PageObjects . dashboard . getPanelTitles ( ) ;
56+ expect ( titles [ 0 ] ) . to . eql ( originalAccessibleTitles [ 0 ] ) ;
57+ } ) ;
58+ } ) ;
4959 } ) ;
5060}
0 commit comments