generated from UoaWDCC/react-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made test for short and long testimonial card
- Loading branch information
Showing
4 changed files
with
13,875 additions
and
9,921 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
frontend2/components/Home/Testimonials/Card/TestimonialCard.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { render, screen } from '@/test-utils'; | ||
import { TestimonialCard, Testimonial } from './TestimonialCard'; | ||
|
||
describe('Testing a long Testimonial Card', () => { | ||
const placeholderTestimony : Testimonial = { | ||
quote: `Joining ASPA has been one of the best parts of my university experience. Whether you're a beginner or a seasoned player, | ||
there's always someone to share a game with and plenty of opportunities to improve your skills. The club’s friendly community | ||
and regular events make it easy to meet new people and have a great time. ASPA isn’t just about pool; it’s about connecting with | ||
like-minded students who share a passion for the game. I highly recommend it to anyone looking to have fun and learn along the way!`, | ||
author: 'James Wellington, Senior Coordinator of Student Engagement and Event Management for the Auckland Student Pool Association, and Longstanding Club Member' | ||
}; | ||
it('renders correctly', () => { | ||
render( | ||
<TestimonialCard | ||
testimonial={placeholderTestimony} | ||
/> | ||
); | ||
expect(screen.getByText(placeholderTestimony.quote)).toBeInTheDocument(); | ||
expect(screen.getByText(placeholderTestimony.author)).toBeInTheDocument(); | ||
}); | ||
}); | ||
|
||
describe('Testing a short Testimonial Card', () => { | ||
const placeholderTestimony : Testimonial = { | ||
quote: `Was good!`, | ||
author: 'JT' | ||
}; | ||
it('renders correctly', () => { | ||
render( | ||
<TestimonialCard | ||
testimonial={placeholderTestimony} | ||
/> | ||
); | ||
expect(screen.getByText(placeholderTestimony.quote)).toBeInTheDocument(); | ||
expect(screen.getByText(placeholderTestimony.author)).toBeInTheDocument(); | ||
}); | ||
}); |
Oops, something went wrong.