File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -191,11 +191,15 @@ describe('LandingPage', () => {
191191 expect ( navigator . clipboard . writeText ) . not . toHaveBeenCalled ( ) ;
192192 } ) ;
193193
194- it ( 'renders the FeatureCards' , ( ) => {
194+ it ( 'renders exactly 3 FeatureCards with correct titles ' , ( ) => {
195195 render ( < LandingPage /> ) ;
196- expect ( screen . getByText ( 'Real-time Sync' ) ) . toBeDefined ( ) ;
197- expect ( screen . getByText ( 'Theme Engine' ) ) . toBeDefined ( ) ;
198- expect ( screen . getByText ( 'Isometric Math' ) ) . toBeDefined ( ) ;
196+
197+ const featureHeadings = screen . getAllByRole ( 'heading' , { level : 3 } ) ;
198+
199+ expect ( featureHeadings ) . toHaveLength ( 3 ) ;
200+
201+ const titles = featureHeadings . map ( ( h ) => h . textContent ) ;
202+ expect ( titles ) . toEqual ( [ 'Real-time Sync' , 'Theme Engine' , 'Isometric Math' ] ) ;
199203 } ) ;
200204
201205 it ( 'renders the CustomizeCTA' , ( ) => {
You can’t perform that action at this time.
0 commit comments