Skip to content
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

[Task]: Frontend tests for server components (search page, page not found) #1393

Closed
rylew1 opened this issue Mar 4, 2024 · 3 comments · Fixed by #2189 or #2197
Closed

[Task]: Frontend tests for server components (search page, page not found) #1393

rylew1 opened this issue Mar 4, 2024 · 3 comments · Fixed by #2189 or #2197
Assignees
Labels
project: grants.gov Grants.gov Modernization tickets

Comments

@rylew1
Copy link
Contributor

rylew1 commented Mar 4, 2024

Summary

  • Create new pattern for server component page tests
  • Fix existing tests that are failing/commented out - IE: search.test.tsx

Acceptance criteria

  • search.test.tsx successfully tests against a server component
  • not-found.test.tsx tests against server component

Notes

  • Testing: server component search page gets initial results and passes to client component
  • For the not found page: checking strings
@rylew1 rylew1 added the project: grants.gov Grants.gov Modernization tickets label Mar 4, 2024
@rylew1 rylew1 changed the title [Task]: Create server component tests [Task]: Create server component test for search page Mar 5, 2024
@sumiat sumiat moved this from Icebox to Sprint Ready in Simpler.Grants.gov Product Backlog Mar 5, 2024
@rylew1 rylew1 changed the title [Task]: Create server component test for search page [Task]: Create server component test for search page, page not found Mar 7, 2024
@sumiat sumiat removed the refinement label Mar 19, 2024
@rylew1 rylew1 self-assigned this Apr 1, 2024
@rylew1 rylew1 changed the title [Task]: Create server component test for search page, page not found [Task]: Frontend tests for server components (search page, page not found) Apr 1, 2024
@rylew1 rylew1 moved this from Sprint Ready to In Progress in Simpler.Grants.gov Product Backlog Apr 2, 2024
@rylew1 rylew1 moved this from In Progress to In Review in Simpler.Grants.gov Product Backlog Apr 3, 2024
@rylew1 rylew1 moved this from In Review to In Progress in Simpler.Grants.gov Product Backlog Apr 4, 2024
@rylew1 rylew1 moved this from In Progress to Icebox in Simpler.Grants.gov Product Backlog Apr 10, 2024
@acouch
Copy link
Collaborator

acouch commented Apr 15, 2024

@rylew1 can we move this to: https://github.com/HHS/simpler-grants-gov/milestone/155 since it is something we want to do before closing this line of work but is not blocking users from testing the search page?

@acouch acouch modified the milestones: Search UI - Create initial search page, Search UI - Enhancements and fast follow Apr 15, 2024
@sumiat sumiat moved this from Icebox to Sprint Ready in Simpler.Grants.gov Product Backlog Apr 16, 2024
@rylew1 rylew1 moved this from Sprint Ready to Icebox in Simpler.Grants.gov Product Backlog Apr 23, 2024
@sumiat sumiat moved this from Icebox to Sprint Ready in Simpler.Grants.gov Product Backlog Apr 26, 2024
@rylew1
Copy link
Contributor Author

rylew1 commented Apr 26, 2024

@sumiat I think we should put this one on hold in favor of working on the e2e ticket #1757 - the e2e tests will basically cover the server components.

@acouch
Copy link
Collaborator

acouch commented Sep 20, 2024

We used to have these: https://github.com/HHS/simpler-grants-gov/blob/2024.5.13-1/frontend/tests/pages/404.test.tsx

We removed the page tests for e2e because of an error with next-intl:

Image

The weird thing is is that the pages don't appear to be client components and can't figure out why the test suite thinks they are. I created an example in this branch https://github.com/HHS/simpler-grants-gov/commits/acouch/issue-1393-page-jest-tests/

npm run test tests/pages/404.test.tsx will generate that error.

@github-project-automation github-project-automation bot moved this from Sprint Ready to Done in Simpler.Grants.gov Product Backlog Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment