avh4 / avh4/elm-program-test

Parse "Query.find always expects to find 1 element, but it found 2 instead." errors

Open
#154 0 comments 0 reactions 0 assignees View on GitHub
bug semver: patch
Dominant language
Elm
Stars
95
Forks
28
PR merge metrics
No merged PRs in 30d

Description

Bug introduced in 3.6.2.

```html

A
A

```

```elm
ProgramTest.clickButton "A"
```

TODO:
- [ ] Add a failing test in `tests/ProgramTestTests/UserInput/ClickButtonTest.elm`
- [ ] grab the current error message from that and use it to add a test in `tests/ProgramTest/TestHtmlHacksTest.elm`
- [ ] implement parsing of the error message in `src/ProgramTest/TestHtmlParser.elm`
- [ ] make sure tests pass now
- [ ] update CHANGELOG.md
- [ ] PR should be made against or switched to the "develop" branch (not "main")

Contributor guide

Open the contributing guide

Research direction

Reproduce the duplicate-button case with ProgramTest.clickButton "A" and add the failing test in tests/ProgramTestTests/UserInput/ClickButtonTest.elm. Use its error message to guide the test in tests/ProgramTest/TestHtmlHacksTest.elm, then inspect src/ProgramTest/TestHtmlParser.elm and CHANGELOG.md. Done means the error is parsed, all tests pass, and the changelog is updated; target the develop branch.

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
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.