Skip to content

Fixes #39482 - Replace enzyme test in HeaderToolbar, UserDropdown with…#11063

Open
kfamilonidis wants to merge 1 commit into
theforeman:developfrom
kfamilonidis:pf5-layout-toolbar
Open

Fixes #39482 - Replace enzyme test in HeaderToolbar, UserDropdown with…#11063
kfamilonidis wants to merge 1 commit into
theforeman:developfrom
kfamilonidis:pf5-layout-toolbar

Conversation

@kfamilonidis

Copy link
Copy Markdown
Contributor

Fixes #39482: Replace enzyme test in HeaderToolbar, UserDropdown with…

@Lukshio

Lukshio commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Reasonable migration; the new "hides impersonate icon when not impersonated" test in HeaderToolbar.test.js is a good addition, and UserDropdowns.test.js is a clean, focused migration. However, mocking out nearly every child of HeaderToolbar drops some prop-wiring coverage the old snapshot had.

Critical (must fix before merge)

  • None

Suggestions (should fix)

  • The removed snapshot verified that TaxonomySwitcher received the correct locations/organizations arrays. The new mock (() => <div data-testid="taxonomy-switcher" />) ignores props entirely, so that data-flow coverage is lost. Consider surfacing the received props in the mock (similar to how the UserDropdowns/ImpersonateIcon mocks already render user.current_user.name / stopImpersonationUrl) so this regression class is still caught.
  • Commit message uses Fixes #39482: ... - the documented convention (see develop history, e.g. Fixes #38653 - Fix settings show endpoint) is Fixes #XXXXX - description with a hyphen, not a colon.

Nice to have (optional)

  • None

Checklist gaps

  • TaxonomySwitcher prop-wiring coverage lost in the migration (see above).
  • Commit message hyphen convention.

@kfamilonidis

Copy link
Copy Markdown
Contributor Author

@Lukshio The TaxonomySwitcher mock now surfaces its received props.

@kfamilonidis kfamilonidis changed the title Fixes #39482: Replace enzyme test in HeaderToolbar, UserDropdown with… Fixes #39482 - Replace enzyme test in HeaderToolbar, UserDropdown with… Jul 15, 2026
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.

2 participants