Add `ensureModel`
- Dominant language
- Elm
- Stars
- 95
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
There is `expectModel : (model -> Expectation) -> ProgramTest model msg effect -> Expectation`, but this necessarily "ends the test flow". This means there is no fall back way of doing something like "inspecting the model and the clicking a button".
So I think there is a missing function: `ensureModel : (model -> Expectation) -> ProgramTest model msg effect -> ProgramTest model msg effect`, analogous to the other `ensure*` functions.
This function may be particularly useful when attempting to debug a particular *test* to figure out why the test is failing.
Contributor guide
Research direction
Read the existing expectModel and ensure* functions in the repository to understand how expectations preserve the test flow. Implement the requested ensureModel behavior so an expectation can inspect the model and later interactions can continue, then verify it with the relevant test suite.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elm
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100