Skip to content

feat(admin-ui): add test files for custom components across the system (#2890)#2893

Merged
moabu merged 3 commits into
mainfrom
admin-ui-issue-2890
Jun 25, 2026
Merged

feat(admin-ui): add test files for custom components across the system (#2890)#2893
moabu merged 3 commits into
mainfrom
admin-ui-issue-2890

Conversation

@faisalsiddique4400

@faisalsiddique4400 faisalsiddique4400 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

feat(admin-ui): add test files for custom components across the system (#2890)

Summary

This PR expands automated test coverage by adding test files for custom components used throughout the Admin UI.

The goal is to improve confidence in reusable component behavior, reduce regression risk, and strengthen the overall Jest test suite by ensuring commonly used UI building blocks are covered by automated tests.


Fix Summary

  • Added test files for custom components across the Admin UI
  • Increased coverage for shared and reusable UI components
  • Added baseline rendering validation for custom components
  • Added component interaction and behavior tests where applicable
  • Improved consistency of test coverage across reusable modules
  • Established testing patterns for future component development
  • Reduced the number of untested custom components in the codebase
  • Improved long-term maintainability and regression protection

Verification

npm run test:all
npm run check:all

passes successfully.

  • Verified newly added component test suites execute successfully
  • Verified existing test suites continue to pass
  • Verified reusable component rendering and behavior coverage
  • Verified no regressions introduced by the additional tests
  • Verified lint and type-check pass successfully

🔗 Ticket

Closes: #2890

Summary by CodeRabbit

  • Tests
    • Added extensive end-to-end component test coverage across the admin UI.
    • Verified key interactions for buttons, inputs, dropdowns, modals, tabs, wizards, layouts, and search/filter controls.
    • Added checks for accessibility states, keyboard behavior, loading/disabled states, controlled vs. uncontrolled behavior, and form handling.
    • Expanded coverage for several app dialogs and screens, including timeout, error, webhook, license, upload, and navigation flows.

#2890)

Signed-off-by: faisalsiddique4400 <faisalsiddique10886@gmail.com>
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: da3d9070-eb69-4804-b952-b1f1e280358c

📥 Commits

Reviewing files that changed from the base of the PR and between 7562ac4 and a0ccc61.

📒 Files selected for processing (37)
  • admin-ui/app/components/Accordion/__tests__/Accordion.test.tsx
  • admin-ui/app/components/CustomInput/__tests__/CustomInput.test.tsx
  • admin-ui/app/components/EmptyLayout/__tests__/EmptyLayout.test.tsx
  • admin-ui/app/components/GluuBadge/__tests__/GluuBadge.test.tsx
  • admin-ui/app/components/GluuButton/__tests__/GluuButton.test.tsx
  • admin-ui/app/components/GluuDatePicker/__tests__/GluuDatePicker.test.tsx
  • admin-ui/app/components/GluuDropdown/__tests__/GluuDropdown.test.tsx
  • admin-ui/app/components/GluuDynamicList/__tests__/GluuDynamicList.test.tsx
  • admin-ui/app/components/GluuFilterPopover/__tests__/GluuFilterPopover.test.tsx
  • admin-ui/app/components/GluuModalShell/__tests__/GluuModalShell.test.tsx
  • admin-ui/app/components/GluuSearchToolbar/__tests__/GluuRefreshButton.test.tsx
  • admin-ui/app/components/GluuSearchToolbar/__tests__/GluuSearchToolbar.test.tsx
  • admin-ui/app/components/LicenseScreens/__tests__/ApiKey.test.tsx
  • admin-ui/app/components/LicenseScreens/__tests__/GenerateLicenseCard.test.tsx
  • admin-ui/app/components/ModalLayer/__tests__/ModalLayer.test.tsx
  • admin-ui/app/components/Sidebar/__tests__/Sidebar.test.tsx
  • admin-ui/app/components/SidebarMenu/__tests__/SidebarMenu.test.tsx
  • admin-ui/app/components/Wizard/__tests__/Wizard.test.tsx
  • admin-ui/app/routes/Apps/Gluu/Tests/GluuNavBar.test.tsx
  • admin-ui/app/routes/Apps/Gluu/__tests__/GluuAlert.test.tsx
  • admin-ui/app/routes/Apps/Gluu/__tests__/GluuCommitDialog.test.tsx
  • admin-ui/app/routes/Apps/Gluu/__tests__/GluuDialog.test.tsx
  • admin-ui/app/routes/Apps/Gluu/__tests__/GluuErrorModal.test.tsx
  • admin-ui/app/routes/Apps/Gluu/__tests__/GluuInputEditor.test.tsx
  • admin-ui/app/routes/Apps/Gluu/__tests__/GluuRemovableInputRow.test.tsx
  • admin-ui/app/routes/Apps/Gluu/__tests__/GluuRemovableSelectRow.test.tsx
  • admin-ui/app/routes/Apps/Gluu/__tests__/GluuScriptErrorModal.test.tsx
  • admin-ui/app/routes/Apps/Gluu/__tests__/GluuServiceDownModal.test.tsx
  • admin-ui/app/routes/Apps/Gluu/__tests__/GluuSessionTimeout.test.tsx
  • admin-ui/app/routes/Apps/Gluu/__tests__/GluuSessionTimeoutDialog.test.tsx
  • admin-ui/app/routes/Apps/Gluu/__tests__/GluuTabs.test.tsx
  • admin-ui/app/routes/Apps/Gluu/__tests__/GluuThemeFormFooter.test.tsx
  • admin-ui/app/routes/Apps/Gluu/__tests__/GluuTimeoutModal.test.tsx
  • admin-ui/app/routes/Apps/Gluu/__tests__/GluuUploadFile.test.tsx
  • admin-ui/app/routes/Apps/Gluu/__tests__/GluuViewDetailsModal.test.tsx
  • admin-ui/app/routes/Apps/Gluu/__tests__/GluuWebhookCommitDialog.test.tsx
  • admin-ui/app/routes/Apps/Gluu/__tests__/GluuWebhookExecutionDialog.test.tsx

📝 Walkthrough

Walkthrough

Adds Jest and React Testing Library suites for admin-ui components across primitives, form widgets, navigation/layout, dialogs, and session/webhook/license flows. The new tests cover rendering, interactions, controlled state, Redux-backed behavior, keyboard handling, and prop-driven variants.

Changes

Admin UI component tests

Layer / File(s) Summary
Basic UI component tests
admin-ui/app/components/Accordion/__tests__/Accordion.test.tsx, admin-ui/app/components/CustomInput/__tests__/CustomInput.test.tsx, admin-ui/app/components/EmptyLayout/__tests__/EmptyLayout.test.tsx, admin-ui/app/components/GluuBadge/__tests__/GluuBadge.test.tsx, admin-ui/app/components/GluuButton/__tests__/GluuButton.test.tsx, admin-ui/app/routes/Apps/Gluu/__tests__/GluuAlert.test.tsx, admin-ui/app/routes/Apps/Gluu/__tests__/GluuUploadFile.test.tsx, admin-ui/app/components/ModalLayer/__tests__/ModalLayer.test.tsx
Adds coverage for rendering, class names, portal mounting, click and keyboard handlers, and open/close behavior in the basic UI component suites.
Form and input widget tests
admin-ui/app/components/GluuDatePicker/__tests__/GluuDatePicker.test.tsx, admin-ui/app/components/GluuDropdown/__tests__/GluuDropdown.test.tsx, admin-ui/app/components/GluuDynamicList/__tests__/GluuDynamicList.test.tsx, admin-ui/app/components/GluuFilterPopover/__tests__/GluuFilterPopover.test.tsx, admin-ui/app/routes/Apps/Gluu/__tests__/GluuInputEditor.test.tsx, admin-ui/app/routes/Apps/Gluu/__tests__/GluuRemovableInputRow.test.tsx, admin-ui/app/routes/Apps/Gluu/__tests__/GluuRemovableSelectRow.test.tsx, admin-ui/app/routes/Apps/Gluu/__tests__/GluuThemeFormFooter.test.tsx
Adds coverage for date, dropdown, list, popover, editor, row, and footer components with value binding, selection, validation, and callback flows.
Navigation, layout, and toolbar tests
admin-ui/app/components/Sidebar/__tests__/Sidebar.test.tsx, admin-ui/app/components/SidebarMenu/__tests__/SidebarMenu.test.tsx, admin-ui/app/components/Wizard/__tests__/Wizard.test.tsx, admin-ui/app/routes/Apps/Gluu/__tests__/GluuTabs.test.tsx, admin-ui/app/routes/Apps/Gluu/Tests/GluuNavBar.test.tsx, admin-ui/app/components/GluuSearchToolbar/__tests__/GluuSearchToolbar.test.tsx, admin-ui/app/components/GluuSearchToolbar/__tests__/GluuRefreshButton.test.tsx
Adds coverage for sidebar and menu classes, wizard step switching, tab selection, navbar rendering, search inputs, filters, and toolbar action callbacks.
Modal and dialog tests
admin-ui/app/components/GluuModalShell/__tests__/GluuModalShell.test.tsx, admin-ui/app/routes/Apps/Gluu/__tests__/GluuCommitDialog.test.tsx, admin-ui/app/routes/Apps/Gluu/__tests__/GluuDialog.test.tsx, admin-ui/app/routes/Apps/Gluu/__tests__/GluuScriptErrorModal.test.tsx, admin-ui/app/routes/Apps/Gluu/__tests__/GluuServiceDownModal.test.tsx, admin-ui/app/routes/Apps/Gluu/__tests__/GluuErrorModal.test.tsx, admin-ui/app/routes/Apps/Gluu/__tests__/GluuTimeoutModal.test.tsx, admin-ui/app/routes/Apps/Gluu/__tests__/GluuViewDetailsModal.test.tsx
Adds coverage for dialog rendering, closing, overlay and Escape handling, clipboard copy, status text, HTML descriptions, and Redux state changes in modal flows.
Session, webhook, and license screen tests
admin-ui/app/routes/Apps/Gluu/__tests__/GluuSessionTimeout.test.tsx, admin-ui/app/routes/Apps/Gluu/__tests__/GluuSessionTimeoutDialog.test.tsx, admin-ui/app/routes/Apps/Gluu/__tests__/GluuWebhookCommitDialog.test.tsx, admin-ui/app/routes/Apps/Gluu/__tests__/GluuWebhookExecutionDialog.test.tsx, admin-ui/app/components/LicenseScreens/__tests__/ApiKey.test.tsx, admin-ui/app/components/LicenseScreens/__tests__/GenerateLicenseCard.test.tsx
Adds coverage for idle timeout countdown behavior, webhook dialog gating and results rendering, and license screen loading, errors, and trial-generation actions.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

Possibly related PRs

Poem

A bunny hopped through test-file rows,
With whiskers, clicks, and tidy flows.
🐰 Tabs and dialogs now shine bright,
The suite hums softly through the night.
Thump-thump — a happy carrot glow!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch admin-ui-issue-2890

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mo-auto mo-auto added comp-admin-ui Component affected by issue or PR kind-feature Issue or PR is a new feature request labels Jun 24, 2026
@sonarqubecloud

Copy link
Copy Markdown

@moabu moabu merged commit dbdcd19 into main Jun 25, 2026
4 checks passed
@moabu moabu deleted the admin-ui-issue-2890 branch June 25, 2026 07:53
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-admin-ui Component affected by issue or PR kind-feature Issue or PR is a new feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(admin-ui): Add test files for custom components across the system

4 participants