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
Create a rule that throws an error when using ReactSelector() on a selector string which will result in a null as part of the /react ruleset.
Problem & Goal
testcafe-react-selectors has a known limitation where selecting root components start at the root React component to look down the component tree. This means invalid selectors that reference html outside of the base react component like body prior to the react component name will return null even if the React component name exists.
Throw an error stating this selector will likely return null and should only start with the react component. Alternatives should be provided as well to identify other valid selector methods.
Feature Request
Create a rule that throws an error when using
ReactSelector()
on a selector string which will result in anull
as part of the/react
ruleset.Problem & Goal
testcafe-react-selectors
has a known limitation where selecting root components start at the root React component to look down the component tree. This means invalid selectors that reference html outside of the base react component likebody
prior to the react component name will return null even if the React component name exists.Throw an error stating this selector will likely return null and should only start with the react component. Alternatives should be provided as well to identify other valid selector methods.
Expected behavior
Should throw an error on line 5, highlighting
ReactSelector()
providing a message that this will likely return null.The text was updated successfully, but these errors were encountered: