You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've noticed an error in our tests of a component that is using ActionList (see screenshot). It seems to be attributed to this line of code.
It fails any time one of our ActionList items has {active: true}
Expected behavior
Tests should not fail
Actual behavior
Test fails with error scrollArea.current?.scrollTo is not a function
Steps to reproduce
Create a component that uses an ActionList
In the items prop, define one of the items as {active: true}
Write a test for the component, and trigger the ActionList to open
See error in the test: scrollArea.current?.scrollTo is not a function
Are you using React components?
None
Polaris version number
^12.23.0
Browser
N/A
Device
N/A
The text was updated successfully, but these errors were encountered:
I did have to do quite some digging to figure that out. If its not possible to prevent this issue, maybe the test workaround could be documented somewhere so its easier for others to find :)
Summary
We've noticed an error in our tests of a component that is using ActionList (see screenshot). It seems to be attributed to this line of code.
It fails any time one of our
ActionList
items has{active: true}
Expected behavior
Tests should not fail
Actual behavior
Test fails with error
scrollArea.current?.scrollTo is not a function
Steps to reproduce
ActionList
items
prop, define one of the items as{active: true}
scrollArea.current?.scrollTo is not a function
Are you using React components?
None
Polaris version number
^12.23.0
Browser
N/A
Device
N/A
The text was updated successfully, but these errors were encountered: