Skip to content

Improve test coverage across frontend-component-header #639

@PKulkoRaccoonGang

Description

@PKulkoRaccoonGang

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions