elm-program-test
elm-program-test copied to clipboard
clickButton should match (or prefer) full-text matches over substring matches
<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.
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.