Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BraidTestProvider: Provide scrollIntoView stub function for jsdom #1590

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

michaeltaranto
Copy link
Contributor

In an earlier PR the Autosuggest moved from using a custom scrolling function over to the native scrollIntoView API.
Due to jsdom not supporting it, we stubbed it for our tests, but this has resulted in the following error:

Error: Uncaught [TypeError: highlightedItem?.scrollIntoView is not a function]

Moving the stubs to a side effect of importing BraidTestProvider to solve it in all Braid consumers test environments.

@michaeltaranto michaeltaranto requested a review from a team as a code owner September 19, 2024 22:51
Copy link

changeset-bot bot commented Sep 19, 2024

🦋 Changeset detected

Latest commit: 90a04a8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
braid-design-system Patch

Not sure what this means? Click here to learn what changesets are.

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

@michaeltaranto michaeltaranto merged commit 819c667 into master Sep 19, 2024
6 checks passed
@michaeltaranto michaeltaranto deleted the fix-scrollintoview-test-error branch September 19, 2024 23:16
@seek-oss-ci seek-oss-ci mentioned this pull request Sep 19, 2024
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