File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ import { render , screen } from "@testing-library/react" ;
2+ import Home from "./index.tsx" ;
3+
4+ describe ( "Home" , ( ) => {
5+ const setup = ( ) => {
6+ render ( < Home /> ) ;
7+ } ;
8+
9+ it ( "renders the Hero content" , ( ) => {
10+ setup ( ) ;
11+
12+ expect ( screen . getByText ( "Where Code Meets Community" ) ) . toBeInTheDocument ( ) ;
13+ expect ( screen . getByRole ( "button" , { name : "Join us" } ) ) . toBeInTheDocument ( ) ;
14+ } ) ;
15+
16+ it ( "renders the Features content" , ( ) => {
17+ setup ( ) ;
18+
19+ expect ( screen . getByText ( "Active Community" ) ) . toBeInTheDocument ( ) ;
20+ expect (
21+ screen . getByText ( / C o n n e c t w i t h l i k e - m i n d e d d e v e l o p e r s / ) ,
22+ ) . toBeInTheDocument ( ) ;
23+ } ) ;
24+
25+ it ( "renders the Showcase content" , ( ) => {
26+ setup ( ) ;
27+
28+ expect ( screen . getByText ( "Community Showcase" ) ) . toBeInTheDocument ( ) ;
29+ } ) ;
30+
31+ it ( "renders the CTA content" , ( ) => {
32+ setup ( ) ;
33+
34+ expect (
35+ screen . getByText ( "Ready to Join Our Community?" ) ,
36+ ) . toBeInTheDocument ( ) ;
37+ expect (
38+ screen . getByRole ( "link" , { name : "Join Code Cafe" } ) ,
39+ ) . toBeInTheDocument ( ) ;
40+ } ) ;
41+ } ) ;
You can’t perform that action at this time.
0 commit comments