avh4 / elm-program-test

Test Elm programs
https://elm-program-test.netlify.com/
MIT License
93 stars 27 forks source link

firstErrorOf: couldn't parse failure report #162

Open ryan-haskell opened 2 years ago

ryan-haskell commented 2 years ago

Hey Aaron! Got this while hanging with you on Twitch:

Expected one of the following to exist:
    - <button> with text
        > PLEASE REPORT THIS AT <https://github.com/avh4/elm-program-test/issues>: firstErrorOf: couldn't parse failure report: Expecting Keyword tag  at row 77, col 17
    Expecting Keyword text  at row 77, col 17
    Expecting Keyword attribute  at row 77, col 17
    Expecting Keyword containing  at row 77, col 17
    Expecting  ] at row 77, col 17
    Expecting Keyword attribute  at row 77, col 17
    Expecting Keyword containing  at row 77, col 17    Expecting  ] at row 77, col 17
    - <form> with submit <input> with value
        > PLEASE REPORT THIS AT <https://github.com/avh4/elm-program-test/issues>: firstErrorOf: couldn't parse failure report: Expecting Keyword tag  at row 77, col 17
    Expecting Keyword text  at row 77, col 17
    Expecting Keyword attribute  at row 77, col 17
    Expecting Keyword containing  at row 77, col 17    Expecting  ] at row 77, col 17

Here is the project at the commit producing the error: https://github.com/ryannhg/elm-uno/tree/ca8c3719285df279998d47245dab5132ed68b077

You can run npm run test to reproduce this ( or elm-test )

avh4 commented 2 years ago

Note to self: it looks like ProgramTest.clickButton is using some selector whose error output is not handled yet by TestHtmlParser https://github.com/avh4/elm-program-test/blob/18abbbea4257c99572df225bfba3febc82268721/src/ProgramTest/TestHtmlParser.elm#L136-L160