avh4 / avh4/elm-program-test

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

Open
#155 1 comment 0 reactions 0 assignees View on GitHub
bug discussion help wanted
Dominant language
Elm
Stars
95
Forks
28
PR merge metrics
No merged PRs in 30d

Description

```html

A
Analyze

```

```elm
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

Open the contributing guide

Research direction

Start by reproducing the HTML example with ProgramTest.clickButton "A" and inspect how it uses Test.Html.Selector.text. Check whether the selector dependency can distinguish full-text from substring matches; done means the first button is selected without breaking existing clickButton behavior, or the dependency limitation is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
elm
Domain
testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.