Bump @vscode-elements/react-elements and fix resulting test failures - #4484
Merged
Conversation
Bumps [@vscode-elements/react-elements](https://github.com/vscode-elements/react-elements) from 0.9.0 to 2.4.0. - [Release notes](https://github.com/vscode-elements/react-elements/releases) - [Commits](vscode-elements/react-elements@v0.9.0...v2.4.0) --- updated-dependencies: - dependency-name: "@vscode-elements/react-elements" dependency-version: 2.4.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
@vscode-elements/elements 2.x uses ResizeObserver in several components (e.g. vscode-table, vscode-form-container), which is not implemented in jsdom. Polyfill it in the view jest setup so these components render in tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f20698a7-f008-46a3-92a4-63037eb03a05
The vscode-checkbox host element no longer exposes a "checkbox" ARIA role in @vscode-elements/elements 2.x (the role now lives on an <input> inside its shadow DOM, which testing-library cannot reach). Find the checkbox by tag name instead, waiting for the disabled attribute that Lit reflects asynchronously. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f20698a7-f008-46a3-92a4-63037eb03a05
nickrolfe
changed the base branch from
dependabot/npm_and_yarn/extensions/ql-vscode/vscode-elements/react-elements-2.4.0
to
main
July 29, 2026 10:03
Contributor
There was a problem hiding this comment.
Pull request overview
Updates VS Code webview components to v2 and adapts tests to API/environment changes.
Changes:
- Bumps
@vscode-elements/react-elementsto 2.4.0. - Adds a jsdom
ResizeObservermock. - Updates checkbox state tests for the new shadow DOM structure.
Show a summary per file
| File | Description |
|---|---|
extensions/ql-vscode/package.json |
Updates the dependency version. |
extensions/ql-vscode/package-lock.json |
Locks updated transitive dependencies. |
extensions/ql-vscode/src/view/jest.setup.ts |
Adds the ResizeObserver test mock. |
extensions/ql-vscode/src/view/variant-analysis/__tests__/RepoRow.spec.tsx |
Updates checkbox test queries. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Files not reviewed (1)
- extensions/ql-vscode/package-lock.json: Generated file
- Files reviewed: 3/4 changed files
- Comments generated: 1
- Review effort level: Medium
The findCheckbox helper only waited for the vscode-checkbox element to exist, not for Lit to reflect the disabled property to an attribute, so the enabled/disabled assertions at each call site raced the async update. Move the assertion into the waitFor callback via an expected state argument so the retry loop waits for reflection. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0f8ebf0f-6429-4147-b7eb-ffacf1a942da
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This contains the dependabot bump from #4420 plus some test fixes generated by Copilot.
I asked it to check whether anything in the implementation needed to change as well, and it claims not: