Skip to content

test: Add comprehensive test coverage for hasInteractiveNodes utility - #7350

Merged
francinelucca merged 2 commits into
perf/hasinteractivenodes-cleanupfrom
copilot/sub-pr-7342
Dec 17, 2025
Merged

test: Add comprehensive test coverage for hasInteractiveNodes utility#7350
francinelucca merged 2 commits into
perf/hasinteractivenodes-cleanupfrom
copilot/sub-pr-7342

Conversation

CopilotAI commented Dec 17, 2025

Copy link
Copy Markdown
Contributor

Changelog

New

  • Added comprehensive test suite for hasInteractiveNodes utility (35 tests total)
  • Tests for all interactive element types: button, a[href], select, input, textarea, audio[controls], video[controls], [contenteditable], summary
  • Tests for non-interactive states: [disabled], [hidden], [inert], display:none, visibility:hidden, tabindex="-1"
  • Tests for ignoreNodes parameter behavior
  • Performance scenario tests: large DOM trees, early termination optimization
  • Complex scenario tests: deeply nested structures, mixed valid/invalid elements

Changed

  • None

Removed

  • None

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; test-only changes, no API impact

Testing & Reviewing

Run tests: npm test -- hasInteractiveNodes.test.ts

All 35 tests validate:

  • Correct detection of interactive vs non-interactive elements
  • Proper handling of visibility/disabled states
  • ignoreNodes exclusion logic
  • Optimized selector-based implementation matches expected behavior

Merge checklist


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@changeset-bot

changeset-botBot commented Dec 17, 2025

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 761187d

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

Co-authored-by: francinelucca <40550942+francinelucca@users.noreply.github.com>
CopilotAI changed the title [WIP] Optimize hasInteractiveNodes for better performancetest: Add comprehensive test coverage for hasInteractiveNodes utilityDec 17, 2025
@francinelucca
francinelucca marked this pull request as ready for review December 17, 2025 16:58
@francinelucca
francinelucca requested a review from a team as a code ownerDecember 17, 2025 16:58
@github-actionsgithub-actionsBot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Dec 17, 2025
@github-actions

Copy link
Copy Markdown
Contributor

👋 Hi, this pull request contains changes to the source code that github/github-ui depends on. If you are GitHub staff, test these changes with github/github-ui using the integration workflow. Or, apply the integration-tests: skipped manually label to skip these checks.

@francineluccafrancinelucca added the skip changeset This change does not need a changelog label Dec 17, 2025
@github-actions
github-actionsBot requested a deployment to storybook-preview-7350 December 17, 2025 17:02 Abandoned
@github-actions
github-actionsBottemporarily deployed to storybook-preview-7350 December 17, 2025 17:13 Inactive
@francinelucca
francinelucca merged commit 80dcc10 into perf/hasinteractivenodes-cleanupDec 17, 2025
59 of 92 checks passed
@francinelucca
francinelucca deleted the copilot/sub-pr-7342 branch December 17, 2025 17:13
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: recommendedThis change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpmskip changesetThis change does not need a changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@francinelucca