Skip to content

[WIP] Skip tests using userEvent.setup in TreeView.test.tsx#7813

Closed
Copilot wants to merge 1 commit intomainfrom
copilot/skip-user-event-tests
Closed

[WIP] Skip tests using userEvent.setup in TreeView.test.tsx#7813
Copilot wants to merge 1 commit intomainfrom
copilot/skip-user-event-tests

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 7, 2026

  • Inspect TreeView test file and repo instructions to identify only the tests that call userEvent.setup
  • Run baseline validation commands to understand current build/test/lint state
  • Update only packages/react/src/TreeView/TreeView.test.tsx by changing the specified it(...) blocks to it.skip(...)
  • Run targeted formatting/validation for the modified test file and verify no other files changed
  • Run final validation, secret scan, and review checks
Original prompt

In the file packages/react/src/TreeView/TreeView.test.tsx, skip every test that uses userEvent.setup in its body.

For each it(...) (or test(...)) block whose body contains a call to userEvent.setup, change it to it.skip(...) (or test.skip(...)). Do not modify any other tests, and do not modify the implementation file. Only this single test file should be changed.

Specifically, based on the current contents of the file, the following tests should be skipped (all contain userEvent.setup() or userEvent.setup in their body):

  1. it('should include aria-expanded when a SubTree contains content', ...) in the Markup describe block.
  2. it('should move focus to current treeitem by default', ...) in the Markup describe block.
  3. it('should toggle when receiving focus from chevron click', ...) in the Markup describe block.
  4. it("should move focus to first treeitem when focusing back in after clicking on a treeitem's secondary action", ...) in the Markup describe block.
  5. it('updates aria live region when loading is done', ...) in the Asynchronous loading describe block.
  6. it('should update aria-expanded if no content is loaded in', ...) in the Asynchronous loading describe block.
  7. The top-level it('should activate the dialog for trailing action when keyboard shortcut is used', ...) test (it calls userEvent.setup() at the top of the test body).

For each, replace the leading it( with it.skip(. Preserve everything else exactly (arguments, formatting, async, etc.).

Do NOT skip tests that only use userEvent.keyboard or userEvent.click directly without calling userEvent.setup (e.g., the 'moves focus to parent item after closing error dialog' test uses userEvent.keyboard but no userEvent.setup, so it should NOT be skipped).

After making the changes, ensure the file still passes lint/format checks (run npm run format if needed). No other files should be modified.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: Can you create a PR that skips any test that uses userEvent.setup in it, in this file?

Assistant: I've dispatched the coding agent to create the PR — it's now waiting on your confirmation in the dialog before it can proceed.

This pull request was created from Copilot chat.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 7, 2026

⚠️ No Changeset found

Latest commit: 38b925f

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

@TylerJDev TylerJDev closed this May 7, 2026
Copilot stopped work on behalf of TylerJDev due to an error May 7, 2026 14:29
Copilot AI requested a review from TylerJDev May 7, 2026 14:29
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.

2 participants