Skip to content

Conversation

Brehana-Naidu
Copy link
Collaborator

No description provided.

@dhyana6466
Copy link
Collaborator

Nice work adding tests for the ImageGrid. The coverage is good – rendering, captions, missing captions, accessibility and even a placeholder case. I like that you used getByAltText and also added the axe check.

A couple of things to improve:

  • The interaction test just checks if the image is still in the doc. Better to mock the click/onSelect and assert it gets called with the right data.
  • The placeholder test might be fragile with next/image. Could mock it or check with a data-testid instead of relying on the exact src.
  • In that placeholder test maybe keep the props consistent and spread defaultProps so styles are not skipped.
  • Double-check the import path for ImageGrid. Some other tests in the repo use app/components/... instead of ../components/.... Just want to make sure CI doesn’t fail.
  • If items are clickable, maybe also add a small keyboard test for accessibility.

Overall this is a solid start. With those fixes the test suite will be strong.

@Brehana-Naidu Brehana-Naidu closed this by deleting the head repository Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants