Attributes containing `"` lead to a failure to show error details
- Dominant language
- Elm
- Stars
- 95
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
When:
- the view html contains attributes like `Html.Attributes.attribute "contains-double-quote" "\""`
- and a selector does not match, then
elm-program-test shows an error like:
```
PLEASE REPORT THIS AT : renderHtml: couldn't parse failure report: Unexpected Char at row 4, col 10
▼ ProgramTest.clickButton "that does not exist"
Expected one of the following to exist:
- with text
✓ has tag "button"
✗ has containing [ text "that does not exist" ]
- with with alt text
...etc etc...
```
Here's a commit demonstrating that in the test cases: https://github.com/avh4/elm-program-test/commit/b67267b92110420b918acdfd20742ba7d5cdbf74
Contributor guide
Research direction
Reproduce the failure from commit b67267b92110420b918acdfd20742ba7d5cdbf74 using an attribute containing a double quote and ProgramTest.clickButton. Start at the renderHtml failure-report parsing path; done means the selector mismatch report renders its error details instead of failing with an Unexpected Char message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elm
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100