-
Notifications
You must be signed in to change notification settings - Fork 0
Add focused hero content assertions to home test #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import { render, screen } from '@testing-library/react' | ||
|
|
||
| import Home from '../page' | ||
|
|
||
| describe('Home Page', () => { | ||
| it('renders the hero heading and description', () => { | ||
| render(<Home />) | ||
|
Comment on lines
+1
to
+7
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The new home page test imports Useful? React with 👍 / 👎. |
||
|
|
||
| expect( | ||
| screen.getByRole('heading', { name: /AI Engineering MVP Template/i }) | ||
| ).toBeInTheDocument() | ||
|
|
||
| expect( | ||
| screen.getByText( | ||
| /A starter template for building AI-powered applications with Vector Institute branding\./i | ||
| ) | ||
| ).toBeInTheDocument() | ||
| }) | ||
| }) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify
@testing-library/jest-domis configured.The test uses
.toBeInTheDocument()matcher (lines 11, 17) which requires@testing-library/jest-dom. Ensure this is imported in your Jest setup file (e.g.,jest.setup.tsor similar).Run the following script to verify the setup:
🏁 Script executed:
Length of output: 217
Running refined checks for
@testing-library/jest-domconfiguration.🏁 Script executed:
Length of output: 286
Running refined checks for
@testing-library/jest-domconfiguration.🏁 Script executed:
Length of output: 435
Add
@testing-library/jest-domand configure Jest setup@testing-library/jest-domto devDependencies in frontend/package.jsonsetupFilesAfterEnvin your Jest config.🤖 Prompt for AI Agents