avh4/elm-program-test

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

Open

#155 opened on Feb 22, 2022

View on GitHub
 (1 comment) (0 reactions) (0 assignees)Elm (28 forks)github user discovery
bugdiscussionhelp wanted

Repository metrics

Stars
 (95 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

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

Contributor guide