Skip to content

Conversation

@adierkens
Copy link
Contributor

@adierkens adierkens commented Aug 1, 2025

Closes #6383

Migrates the ActionMenu tests from jest to vitest.

In converting the tests, they highlighted an issue with the focus handling (#6434) that were unexpectedly being suppressed in the jest tests. There are 2 tests that I explicitly skipped b/c they were directly testing this behavior, and 1 that needed a slightly different setup procedure to account for the bug. These should be removed when #6434 is addressed

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why
    • Only testing files changed

@changeset-bot
Copy link

changeset-bot bot commented Aug 1, 2025

⚠️ No Changeset found

Latest commit: 77c1ca2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Aug 1, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Aug 1, 2025

👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks!

@adierkens adierkens added the skip changeset This change does not need a changelog label Aug 1, 2025
@adierkens adierkens marked this pull request as ready for review August 1, 2025 15:51
Copilot AI review requested due to automatic review settings August 1, 2025 15:51
@adierkens adierkens requested a review from a team as a code owner August 1, 2025 15:51
@adierkens adierkens requested a review from pksjce August 1, 2025 15:51
@github-actions
Copy link
Contributor

github-actions bot commented Aug 1, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 90.03 KB (0%)
packages/react/dist/browser.umd.js 90.13 KB (0%)

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates ActionMenu tests from Jest to Vitest as part of the broader testing framework migration. The migration revealed focus handling issues that were previously suppressed in Jest tests, requiring some tests to be skipped until the underlying focus trap bug is resolved.

  • Migrates ActionMenu test suite from Jest to Vitest
  • Updates mock functions from jest.fn() to vi.fn()
  • Skips two tests that expose focus handling bugs and adjusts one test to work around the issue

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
packages/react/vitest.config.browser.mts Adds ActionMenu test files to Vitest browser configuration
packages/react/src/ActionMenu/ActionMenu.test.tsx Migrates test suite from Jest to Vitest with necessary adjustments
packages/react/jest.config.js Excludes ActionMenu directory from Jest configuration

KSA2O3O referenced this pull request Aug 1, 2025
Co-authored-by: Josh Black <joshblack@github.com>
@adierkens adierkens force-pushed the adierkens/vitest-migration-actionmenu branch from 6a0125c to 94e09db Compare August 1, 2025 15:56
@github-actions github-actions bot temporarily deployed to storybook-preview-6435 August 1, 2025 15:56 Inactive
@joshblack joshblack added this pull request to the merge queue Aug 1, 2025
Merged via the queue into main with commit 895a065 Aug 1, 2025
63 of 65 checks passed
@joshblack joshblack deleted the adierkens/vitest-migration-actionmenu branch August 1, 2025 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm skip changeset This change does not need a changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update ActionMenu tests from Jest to Vitest

3 participants