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

test: basic tests for static pages [1393] #2197

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

doug-s-nava
Copy link
Collaborator

@doug-s-nava doug-s-nava commented Sep 23, 2024

Summary

Fixes #1393

Time to review: 15 mins

Changes proposed

Adding basic page level tests for static pages

Context for reviewers

Based on previously existing tests that required some reworking due to code drift and support for internationalization: https://github.com/HHS/simpler-grants-gov/blob/2024.5.13-1/frontend/tests/pages/index.test.tsx

Testing instructions

  1. npx jest tests/pages/page.test.tsx
  2. npx jest tests/pages/research/page.test.tsx
  3. npx jest tests/pages/process/page.test.tsx
  4. npx jest tests/pages/not-found.test.tsx
  5. VALIDATE: all tests pass

Additional information

Screenshots, GIF demos, code examples or output to help show the changes working as expected.

@doug-s-nava doug-s-nava force-pushed the dschrashun/page-test-fixes branch from a4ad0cf to d1bf4a4 Compare September 23, 2024 19:57
Copy link

Coverage report for ./frontend

St.
Category Percentage Covered / Total
🟢 Statements
89.67% (-0.93% 🔻)
842/939
🟡 Branches 71.79% 224/312
🟢 Functions
86.57% (-1.33% 🔻)
174/201
🟢 Lines
90.09% (-1.18% 🔻)
791/878
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟡
... / not-found.tsx
66.67% 100% 50% 66.67%
🟢
... / intlMocks.ts
100% 100% 100% 100%
🟡
... / page.tsx
71.43% 100% 50% 71.43%
🟡
... / page.tsx
75% 100% 50% 75%
🟡
... / page.tsx
77.78% 100% 50% 77.78%

Test suite run success

187 tests passing in 58 suites.

Report generated by 🧪jest coverage report action from d1bf4a4

@doug-s-nava doug-s-nava marked this pull request as ready for review September 23, 2024 20:02
Copy link
Collaborator

@mdragon mdragon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, great to get these covered.

@doug-s-nava doug-s-nava merged commit 27b6f35 into main Sep 24, 2024
12 checks passed
@doug-s-nava doug-s-nava deleted the dschrashun/page-test-fixes branch September 24, 2024 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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