Skip to content

Commit dba71d3

Browse files
committed
test(LandingPage): verify 3 FeatureCards render with correct titles
1 parent 7ee2274 commit dba71d3

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

app/page.test.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff 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', () => {

0 commit comments

Comments
 (0)