Skip to content

Improve frontend coverage for entrypoint/bootstrap code and untested UI branches - #636

Merged
conorheffron merged 7 commits into
mainfrom
copilot/analyze-test-coverage
Apr 12, 2026
Merged

Improve frontend coverage for entrypoint/bootstrap code and untested UI branches#636
conorheffron merged 7 commits into
mainfrom
copilot/analyze-test-coverage

Conversation

Copilot AI commented Apr 12, 2026

Copy link
Copy Markdown
Contributor
  • Review new actionable PR comment and referenced review thread
  • Update frontend/src/index.test.js to mock bootstrap dependencies (createRoot, App, AppNavbar, Footer) and assert render wiring
  • Update frontend/src/App.test.js navbar toggle test to assert queried elements exist before interaction
  • Update frontend/src/App.test.js footer non-OK response test to await async assertions with waitFor
  • Run targeted frontend tests for modified test files
  • Run review/security validation and post reply to comment with commit hash

Copilot AI and others added 2 commits April 11, 2026 18:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR increases frontend test coverage for entrypoint/bootstrap code (index.js, reportWebVitals.js) and adds missing branch coverage for navbar collapse toggling and footer non-OK fetch handling.

Changes:

  • Added unit tests for reportWebVitals covering both “no callback” and “callback provided” flows.
  • Added an entrypoint test that exercises index.js bootstrap/render wiring.
  • Extended existing component tests to cover navbar collapse open/close and footer response.ok === false behavior.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
frontend/src/reportWebVitals.test.js Adds tests validating metric forwarding behavior and the no-op path.
frontend/src/index.test.js Adds a bootstrap test that imports index.js and asserts initial wrapper render.
frontend/src/App.test.js Adds tests for navbar collapse toggling and footer non-OK fetch response branch.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread frontend/src/index.test.js Outdated
Comment thread frontend/src/App.test.js
Comment thread frontend/src/App.test.js Outdated
conorheffron and others added 3 commits April 12, 2026 23:19
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@conorheffron

Copy link
Copy Markdown
Owner

@copilot apply changes based on the comments in this thread

@conorheffron

Copy link
Copy Markdown
Owner

@copilot apply changes based on the comments in this thread

Copilot AI commented Apr 12, 2026

Copy link
Copy Markdown
Contributor Author

@copilot apply changes based on the comments in this thread

Applied the requested review-thread updates. The bootstrap test now uses isolated module mocks (createRoot, App, AppNavbar, Footer) and keeps assertions focused on wiring behavior. The App test updates for element existence checks and async waitFor assertions are also in place. Addressed in commit 2c5fea7. No UI changes were made (test-only update).

Copilot AI commented Apr 12, 2026

Copy link
Copy Markdown
Contributor Author

@copilot apply changes based on the comments in this thread

Applied in 2c5fea7 (bootstrap test isolated mocks + App test assertions/waitFor updates from that review thread). No additional changes were needed after that commit. UI screenshot: not applicable (test-only changes, no UI output changed).

@conorheffron
conorheffron merged commit 6ceebb2 into main Apr 12, 2026
11 of 12 checks passed
@conorheffron
conorheffron deleted the copilot/analyze-test-coverage branch April 12, 2026 23:00
@conorheffron conorheffron added bug Something isn't working ui-frontend javascript Pull requests that update Javascript code labels Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working javascript Pull requests that update Javascript code tests unit | integration tests ui-frontend

Projects

Development

Successfully merging this pull request may close these issues.

3 participants