avh4/elm-program-test

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

Open

#155 aperta il 22 feb 2022

Vedi su GitHub
 (1 commento) (0 reazioni) (0 assegnatari)Elm (28 fork)github user discovery
bugdiscussionhelp wanted

Metriche repository

Star
 (95 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

<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.

Guida contributor