elm-program-test icon indicating copy to clipboard operation
elm-program-test copied to clipboard

clickButton should match (or prefer) full-text matches over substring matches

Open avh4 opened this issue 3 years ago • 1 comments

<body>
    <button>A</button>
    <button>Analyze</button>
</body>
ProgramTest.clickButton "A"

This should be able to pass, clicking the first button.

This is a shortcoming of https://package.elm-lang.org/packages/elm-explorations/test/latest/Test-Html-Selector#text afaik, Test.Html.Selector provides no way to distinguish full-text matches from substring matches, so I'm not sure there's a way to fix this without additions to elm-explorations/test.

avh4 avatar Feb 22 '22 23:02 avh4

Just got bit by this as well, but from what I can see a exactText selector was added in this commit https://github.com/elm-explorations/test/commit/4f8a0344edd5be9d221e81f871f65c82a87c9e76 and released in 2.1.0 of elm-explortations/test.

Qluxzz avatar Dec 10 '23 19:12 Qluxzz