openedx / openedx/frontend-component-header
Improve test coverage across frontend-component-header
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10
- Forks
- 193
- Avg merge
- 25d 8h
- Merged PRs (30d)
- 1
Description
Description
Currently, a significant number of components in the frontend-component-header repository lack sufficient test coverage. This makes the codebase harder to maintain, increases the risk of regressions, and slows down development when introducing new features or refactoring existing code.
Below is the latest coverage report:
| File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
|---|---|---|---|---|---|
| All files | 75.88 | 43.78 | 61.85 | 76.29 | |
| src | 88.57 | 76.92 | 75 | 88.57 | |
| Avatar.jsx | 100 | 50 | 100 | 100 | 12 |
| Header.jsx | 93.75 | 79.16 | 50 | 93.75 | 29 |
| Header.messages.jsx | 100 | 100 | 100 | 100 | |
| Icons.jsx | 100 | 100 | 100 | 100 | |
| Logo.jsx | 100 | 100 | 100 | 100 | |
| frontend-platform.d.ts | 0 | 0 | 0 | 0 | |
| index.jsx | 0 | 0 | 0 | 0 | |
| test-utils.js | 0 | 100 | 0 | 0 | 1-3 |
| src/Menu | 33.98 | 7.14 | 39.13 | 33.66 | |
| Menu.jsx | 33.98 | 7.14 | 39.13 | 33.66 | 64-164,179-216 |
| index.jsx | 0 | 0 | 0 | 0 | |
| src/desktop-header | 87.8 | 39.28 | 76.92 | 88.88 | |
| DesktopHeader.jsx | 100 | 75 | 100 | 100 | 60 |
| DesktopHeaderMainOrSecondaryMenu.jsx | 80 | 50 | 100 | 80 | 10,37 |
| DesktopHeaderUserMenu.jsx | 50 | 0 | 0 | 60 | 6-11 |
| DesktopLoggedOutItems.jsx | 100 | 100 | 100 | 100 | |
| DesktopUserMenuToggle.jsx | 100 | 100 | 100 | 100 | |
| src/generic | 100 | 100 | 100 | 100 | |
| messages.js | 100 | 100 | 100 | 100 | |
| src/i18n | 0 | 0 | 0 | 0 | |
| index.js | 0 | 0 | 0 | 0 | |
| src/learning-header | 81.57 | 60 | 50 | 86.11 | |
| AnonymousUserMenu.jsx | 25 | 100 | 0 | 25 | 11-24 |
| AuthenticatedUserDropdown.jsx | 100 | 50 | 100 | 100 | 29 |
| LearningHeader.jsx | 100 | 83.33 | 100 | 100 | 48 |
| LearningHeaderCourseInfo.jsx | 100 | 100 | 100 | 100 | |
| LearningHeaderHelpLink.jsx | 100 | 100 | 100 | 100 | |
| LearningHeaderUserMenuItems.jsx | 60 | 100 | 0 | 75 | 7 |
| LearningLoggedOutButtons.jsx | 60 | 0 | 0 | 75 | 7 |
| LearningUserMenuToggle.jsx | 100 | 100 | 100 | 100 | |
| messages.js | 100 | 100 | 100 | 100 | |
| src/mobile-header | 71.42 | 25 | 46.15 | 71.42 | |
| MobileHeader.jsx | 100 | 66.66 | 100 | 100 | 47-81 |
| MobileHeaderMainMenu.jsx | 30 | 0 | 0 | 30 | 8-36 |
| MobileHeaderUserMenu.jsx | 50 | 0 | 0 | 60 | 5-8 |
| MobileLoggedOutItems.jsx | 60 | 0 | 0 | 75 | 5 |
| MobileUserMenuToggle.jsx | 100 | 100 | 100 | 100 | |
| src/plugin-slots/CourseInfoSlot | 100 | 100 | 100 | 100 | |
| index.jsx | 100 | 100 | 100 | 100 | |
| src/plugin-slots/DesktopHeaderSlot | 100 | 100 | 100 | 100 | |
| index.jsx | 100 | 100 | 100 | 100 | |
| src/plugin-slots/DesktopLoggedOutItemsSlot | 100 | 100 | 100 | 100 | |
| index.jsx | 100 | 100 | 100 | 100 | |
| src/plugin-slots/DesktopMainMenuSlot | 100 | 100 | 100 | 100 | |
| index.jsx | 100 | 100 | 100 | 100 | |
| src/plugin-slots/DesktopSecondaryMenuSlot | 100 | 100 | 100 | 100 | |
| index.jsx | 100 | 100 | 100 | 100 | |
| src/plugin-slots/DesktopUserMenuSlot | 66.66 | 100 | 0 | 66.66 | |
| index.jsx | 66.66 | 100 | 0 | 66.66 | 8 |
| src/plugin-slots/DesktopUserMenuToggleSlot | 100 | 100 | 100 | 100 | |
| index.jsx | 100 | 100 | 100 | 100 | |
| src/plugin-slots/LearningHelpSlot | 100 | 100 | 100 | 100 | |
| index.jsx | 100 | 100 | 100 | 100 | |
| src/plugin-slots/LearningLoggedOutItemsSlot | 66.66 | 100 | 0 | 66.66 | |
| index.jsx | 66.66 | 100 | 0 | 66.66 | 8 |
| src/plugin-slots/LearningUserMenuSlot | 66.66 | 100 | 0 | 66.66 | |
| index.jsx | 66.66 | 100 | 0 | 66.66 | 8 |
| src/plugin-slots/LearningUserMenuToggleSlot | 100 | 100 | 100 | 100 | |
| index.jsx | 100 | 100 | 100 | 100 | |
| src/plugin-slots/LogoSlot | 100 | 100 | 100 | 100 | |
| index.jsx | 100 | 100 | 100 | 100 | |
| src/plugin-slots/MobileHeaderSlot | 100 | 100 | 100 | 100 | |
| index.jsx | 100 | 100 | 100 | 100 | |
| src/plugin-slots/MobileLoggedOutItemsSlot | 66.66 | 100 | 0 | 66.66 | |
| index.jsx | 66.66 | 100 | 0 | 66.66 | 8 |
| src/plugin-slots/MobileMainMenuSlot | 66.66 | 100 | 0 | 66.66 | |
| index.jsx | 66.66 | 100 | 0 | 66.66 | 8 |
| src/plugin-slots/MobileUserMenuSlot | 66.66 | 100 | 0 | 66.66 | |
| index.jsx | 66.66 | 100 | 0 | 66.66 | 8 |
| src/plugin-slots/MobileUserMenuToggleSlot | 100 | 100 | 100 | 100 | |
| index.jsx | 100 | 100 | 100 | 100 | |
| src/studio-header | 100 | 83.87 | 100 | 100 | |
| BrandNav.tsx | 100 | 100 | 100 | 100 | |
| CourseLockUp.tsx | 100 | 100 | 100 | 100 | |
| HeaderBody.tsx | 100 | 91.66 | 100 | 100 | 55 |
| MobileHeader.tsx | 100 | 100 | 100 | 100 | |
| MobileMenu.tsx | 100 | 100 | 100 | 100 | |
| NavDropdownMenu.tsx | 100 | 100 | 100 | 100 | |
| StudioHeader.tsx | 100 | 71.42 | 100 | 100 | 31-34 |
| UserMenu.tsx | 100 | 100 | 100 | 100 | |
| index.ts | 100 | 100 | 100 | 100 | |
| messages.ts | 100 | 100 | 100 | 100 | |
| utils.ts | 100 | 100 | 100 | 100 |
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the coverage report and the lowest-covered entry points, especially src/Menu/Menu.jsx, src/learning-header/AnonymousUserMenu.jsx, src/mobile-header/MobileHeaderMainMenu.jsx, and src/mobile-header/MobileHeaderUserMenu.jsx. Run the existing test and coverage suite, then define a focused set of missing tests; done means the selected components' uncovered paths are tested and coverage improves without regressions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, testing-qa
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100