File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -70,4 +70,23 @@ describe('Card Component', () => {
7070 cy . get ( '[data-test="card-icon"]' ) . should ( 'not.exist' ) ;
7171 cy . get ( '[data-test="card-link"]' ) . should ( 'not.exist' ) ;
7272 } ) ;
73+
74+ // Test hover interactions for cards with links
75+ it ( 'should show "Read More" text when link is provided' , ( ) => {
76+ cy . mount ( < Card { ...RoadmapProps } /> ) ;
77+ cy . get ( '[data-test="card-read-more"]' ) . should ( 'exist' ) ;
78+ cy . get ( '[data-test="card-read-more"]' ) . should ( 'have.text' , 'Read More' ) ;
79+ } ) ;
80+
81+ // Test different text size combinations
82+ it ( 'should render card with small header and large body text sizes' , ( ) => {
83+ const smallHeaderLargeBody = {
84+ ...RoadmapProps ,
85+ headerSize : 'small' ,
86+ bodyTextSize : 'large' ,
87+ } ;
88+ cy . mount ( < Card { ...smallHeaderLargeBody } /> ) ;
89+ cy . get ( '[data-test="card-title"]' ) . should ( 'have.class' , 'text-[0.9rem]' ) ;
90+ cy . get ( '[data-test="card-body"]' ) . should ( 'have.class' , 'text-[1.5rem]' ) ;
91+ } ) ;
7392} ) ;
You can’t perform that action at this time.
0 commit comments