-
Notifications
You must be signed in to change notification settings - Fork 24
Frontend test coverage #792
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry @mshriver, your pull request is larger than the review limit of 150000 diff characters
There was a problem hiding this comment.
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 adds comprehensive frontend test coverage for React components and pages, improves backend test organization by consolidating imports, and provides detailed testing documentation. The changes follow integration testing best practices with minimal mocking.
Key changes:
- Added 11 new frontend test files covering widgets, pages, and components
- Enhanced test utilities with new helpers and mock data factories
- Created comprehensive testing guide documentation
- Refactored backend tests to consolidate imports at file level
- Added backend utility function test coverage
Reviewed changes
Copilot reviewed 35 out of 35 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
frontend/src/widgets/run-aggregate-apex.test.js |
New comprehensive tests for RunAggregateApex widget |
frontend/src/widgets/result-aggregate-apex.test.js |
New tests for ResultAggregateApex widget |
frontend/src/widgets/filter-heatmap.test.js |
Added 557 lines of new test coverage for cell rendering, Jenkins links, and edge cases |
frontend/src/pages/result-list.test.js |
Updated parameter types from number to string for URL params |
frontend/src/pages/login.test.js |
New comprehensive login page tests covering OAuth and form validation |
frontend/src/pages/dashboard.test.js |
Added tests for dashboard selection, CRUD operations, and widget management |
frontend/src/pages/admin/project-edit.test.js |
New tests for project editing admin page |
frontend/src/components/test-history.test.js |
New tests for test history table component |
frontend/src/components/ibutsu-header.test.js |
New tests for header component with project selection |
frontend/src/components/filtering/result-filter.test.js |
Added 277 lines of tests for various filter operations |
frontend/src/components/classify-failures.test.js |
New tests for failure classification component |
frontend/src/test-utils/test-helpers.js |
Added new helper functions for rendering with providers and mocking HTTP responses |
frontend/src/test-utils/mock-data.js |
Added factory functions for Jenkins runs and nested metadata |
frontend/src/test-utils/constants.js |
Added Jenkins and nested metadata test constants |
docs/source/developer-guide/frontend-testing.rst |
Replaced placeholder with comprehensive 569-line testing guide |
backend/tests/test_*.py |
Multiple files refactored to consolidate imports at module level |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import IbutsuHeader from './ibutsu-header'; | ||
| import { IbutsuContext } from './contexts/ibutsu-context'; | ||
| import { HttpClient } from '../utilities/http'; | ||
| import { createMockProject, createMockDashboard } from '../test-utils'; |
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused import createMockDashboard.
| import { createMockProject, createMockDashboard } from '../test-utils'; | |
| import { createMockProject } from '../test-utils'; |
| import { render, screen, waitFor, fireEvent } from '@testing-library/react'; | ||
| import RunAggregateApex from './run-aggregate-apex'; | ||
| import { HttpClient } from '../utilities/http'; | ||
| import { createMockRunAggregatorData } from '../test-utils'; |
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused import createMockRunAggregatorData.
No description provided.