Skip to content

fix: renamed test files to specify unit or integration tests in client#3992

Closed
kunstewi wants to merge 1 commit intoprocessing:developfrom
kunstewi:rename-test-files
Closed

fix: renamed test files to specify unit or integration tests in client#3992
kunstewi wants to merge 1 commit intoprocessing:developfrom
kunstewi:rename-test-files

Conversation

@kunstewi
Copy link
Contributor

@kunstewi kunstewi commented Mar 12, 2026

fixes #3993

NOTE: This is not a breaking change, I have made sure renaming these files don't have any side effects.

@clairep94 could you take a glimpse please?

Thanks a lot for your time.

Issue:

Many test files don't specify if they are unit or integration tests. That creates confusion for contributors and creates inconsistency throughout the project.

Fix

Renamed the test files to specify if they are unit or integration test:

  • This only targets the file renames in the client folder.
  • IDE folder hasn't been touched because I need more understanding of the files in the folder. So few cases can still be present in the IDE file. Such as Toast.test.jsx and files.test.js.
  • test cases are running as previously.
Screenshot 2026-03-12 at 5 37 05 PM

My logic for renaming each test file:

  • (unit) client/common/Button.test.tsx - Reusable user-facing button variants (button, internal link, external link).
  • (unit) client/common/ButtonOrLink.test.tsx - Reusable primitive that conditionally renders button/link and handles click/navigation behavior.
  • (unit) client/common/IconButton.test.tsx - Reusable icon button behavior/props checks.
  • (unit) client/common/RouterTab.test.tsx - Reusable tab link component behavior and router path change assertion.
  • (unit) client/common/Tooltip.test.tsx - Reusable tooltip interaction states (hover/focus/visibility).
  • (unit) client/common/useKeyDownHandlers.test.tsx - Hook-level keyboard handler behavior in isolation.
  • (unit) client/common/useModalClose.test.tsx - Hook-level modal close behavior in isolation.
  • (unit) client/common/usePrevious.test.tsx - Hook-level state transition behavior in isolation.
  • (unit) client/common/useSyncFormTranslations.test.tsx - Hook-level form translation sync behavior in isolation.

  • (unit) client/components/Dropdown/DropdownMenu.test.tsx - Reusable dropdown component behavior (open/select/close).
  • (unit) client/components/Menubar/Menubar.test.tsx - Reusable menubar system behavior (keyboard, submenu, ARIA).
  • (unit) client/components/PreviewNav.test.tsx - User-facing nav component rendering/interaction checks.
  • (unit) client/components/SkipLink.test.tsx - User-facing accessibility control behavior.

  • (unit) client/utils/consoleUtils.test.ts - Utility function outputs for parsing/offset logic.
  • (unit) client/utils/device.test.ts - Utility function behavior for platform detection conditions.
  • (unit) client/utils/dispatcher.test.ts - Utility module behavior (registerFrame, dispatchMessage, listeners).
  • (unit) client/utils/evaluateExpression.test.ts - Utility function behavior and error handling in isolation.
  • (unit) client/utils/formatDate.test.ts - Utility formatting behavior over controlled date inputs.
  • (unit) client/utils/getConfig.test.ts - Utility config resolution behavior by environment shape.
  • (unit) client/utils/language-utils.test.ts - Utility language resolution behavior from navigator inputs.
  • (unit) client/utils/parseStringToType.test.ts - Utility parsing behavior for number/boolean conversion paths.
  • (unit) client/utils/parseURLParams.test.ts - Utility URL parsing behavior over query param permutations.
  • (unit) client/utils/reduxFormUtils.test.ts - Validation utility behavior for form input variants.

I have verified that this pull request:

  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • has no typecheck errors (npm run typecheck)
  • is from a uniquely-named feature branch and is up to date with the develop branch.
  • is descriptively named and links to an issue number, i.e. Fixes #123
  • meets the standards outlined in the accessibility guidelines

@welcome
Copy link

welcome bot commented Mar 12, 2026

🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already.

@clairep94
Copy link
Collaborator

Hi please see the reply in your original issue, thanks! Very open to your suggestions for tests improvements otherwise, or if you want to unit test any components.

@kunstewi kunstewi closed this Mar 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: many existing test files in client don't specify either they are unit or integration test

2 participants