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 errors when a ReactSelector() parameter uses an html entity as a descendent selector without specifying it as a direct descendent with >.
Problem & Goal
testcafe-react-selectors warns about using ReactSelector() with a parameter of a 'ReactComponent div' when the div will only match direct children of the ReactComponent and not all the children of the subcomponent.
// Example html<TodoAppclassName="todo-app"><TodoInput/><TodoList><TodoItempriority="High"key="HighPriority">Item 1</TodoItem><TodoItempriority="Low"key="LowPriority">Item 2</TodoItem></TodoList><divclassName="items-count">Items count: <span>{this.state.itemCount}</span></div></TodoApp>
Feature Request
Create a rule that errors when a
ReactSelector()
parameter uses an html entity as a descendent selector without specifying it as a direct descendent with>
.Problem & Goal
testcafe-react-selectors
warns about usingReactSelector()
with a parameter of a'ReactComponent div'
when thediv
will only match direct children of theReactComponent
and not all the children of the subcomponent.The goal here is to enforce an explicit use of the immediate descendent css selector
>
to ensure the limitation of the library is not overlooked.Expected behavior
The text was updated successfully, but these errors were encountered: