elm-explorations / test

Write unit and fuzz tests for Elm code.
https://package.elm-lang.org/packages/elm-explorations/test/latest
BSD 3-Clause "New" or "Revised" License
237 stars 39 forks source link

Fix Selector.all scope #214

Open Janiczek opened 1 year ago

Janiczek commented 1 year ago

fixes #213

So far I've added tests to map this behaviour, of which the interesting one related to #213 fails (L201-214).

It seems Selector.all [...] delegates the list back to Selector.Internal.queryAll, which allows finding the child selector anywhere in the tree.

This goes against our assumption in Elm Slack:

Screenshot 2023-03-01 at 20 46 19

It might be that :a: the behaviour of Selector.all is correct and our assumption was wrong or :b: Selector.all is wrong and we need to make a breaking change in behaviour. Or maybe there is a way to add some new all-like primitive that will not allow mixing nesting levels, thus not a breaking change.