@@ -355,7 +355,12 @@ describe('ObjectPage', () => {
355355
356356 cy . wait ( 200 ) ;
357357
358- cy . findByText ( 'Goals' ) . should ( 'not.be.visible' ) ;
358+ // first titleText should never be displayed (not.be.visible doesn't work here - only invisible for sighted users)
359+ cy . findByText ( 'Goals' )
360+ . parent ( )
361+ . should ( 'have.css' , 'width' , '1px' )
362+ . and ( 'have.css' , 'margin' , '-1px' )
363+ . and ( 'have.css' , 'position' , 'absolute' ) ;
359364 cy . findByText ( 'Employment' ) . should ( 'not.be.visible' ) ;
360365 cy . findByText ( 'Test' ) . should ( 'be.visible' ) ;
361366
@@ -819,6 +824,7 @@ describe('ObjectPage', () => {
819824 cy . get ( '[data-component-name="ObjectPageAnchorBarExpandBtn"]' ) . click ( ) ;
820825 cy . findByText ( 'https://github.com/SAP/ui5-webcomponents-react' ) . should ( 'not.be.visible' ) ;
821826 } ) ;
827+
822828 it ( 'ObjectPageSection/SubSection: Custom header & hideTitleText' , ( ) => {
823829 document . body . style . margin = '0px' ;
824830 const TestComp = ( { mode } : ObjectPagePropTypes ) => {
@@ -880,8 +886,12 @@ describe('ObjectPage', () => {
880886 cy . get ( '[ui5-tabcontainer]' ) . findUi5TabByText ( 'Goals' ) . click ( ) ;
881887 cy . findByText ( 'Custom Header Section One' ) . should ( 'be.visible' ) ;
882888 cy . findByText ( 'toggle titleText1' ) . click ( { scrollBehavior : false , force : true } ) ;
883- // first titleText should never be displayed
884- cy . findByText ( 'Goals' ) . should ( 'not.be.visible' ) ;
889+ // first titleText should never be displayed (not.be.visible doesn't work here - only invisible for sighted users)
890+ cy . findByText ( 'Goals' )
891+ . parent ( )
892+ . should ( 'have.css' , 'width' , '1px' )
893+ . and ( 'have.css' , 'margin' , '-1px' )
894+ . and ( 'have.css' , 'position' , 'absolute' ) ;
885895 cy . findByText ( 'Custom Header Section One' ) . should ( 'be.visible' ) ;
886896
887897 cy . get ( '[ui5-tabcontainer]' ) . findUi5TabByText ( 'Personal' ) . click ( ) ;
0 commit comments