- Require elm-explorations/test >= 2.2.0 for consistent HTML rendering
- Update links to elm-program-test guidebooks website
- Upgrade to elm-explorations/test 2.0.0
- Added an unused definition to workaround issues with
elm publish
New features:
clickLinknow works for internal links when testing aBrowser.applicationclickLinknow works for links with aria-labelclickLinknow works for links containing img with alt textpushUrlnow works properly for relative urls with query and/or fragment- Added
SimulatedEffect.Task.sequence
Bug fixes:
- Performance regression in 3.6.2 for passing tests is fixed.
New features:
- Functions to simulate DOM events display errors more nicely:
- Extra junk like "
✗ has text "HTML expected by the call to: ..."" has been removed - All passing steps of a query up to the failure will be displayed
- Extra junk like "
- Failure messages simplify the HTML to show only what's relevant to the failure
Bug fixes:
- Using
ensureViewHasNotinside ofwithinno longer passes whenwithinfails to find its target. clickButtonworks correctly withrole=buttonelements when there are other<button>elements in view.
New features:
- Functions to simulate DOM events now report more detailed and more relevant information in the case of failure.
Bug fixes:
- Functions to simulate DOM events now correctly fail in all cases when there are multiple possible matches.
Changes:
expectHttpRequestWasMade,expectHttpRequest, andsimulateHttpResponsewill now fail if multiple pending requests have been made to the relevant (method, URL) pair.
New features:
- Added
expectHttpRequestsfor checking whether multiple requests have been made to the same endpoint (or that zero requests have been made). - Added
simulateHttpResponseAdvancedfor simulating HTTP responses when multiple requests have been made to the same endpoint. - Added
SimulatedEffect.Time.now clickButtoncan now click buttons containing only an image with alt text
Bug fixes:
- Resolving a relative URL (such as when
clickLinkis used) is correct in more cases (specifically, when the base URL has a query or fragment string)
Packaging:
- The
HttpRequesttype is now exposed.
New features:
- Added to
SimulatedEffect.Task:map2,map3,map4,map5,onError
Documentation:
- Added NavigationKeyExample showing how to test programs that require the use of
Browser.Navigation.Key
New features:
clickButtoncan now match<button>androle=buttonelements via theiraria-label- added API for simulating browser navigation in
SimulatedEffect.Navigation:back,load,reload,reloadAndSkipCache - added
ProgramTest.getOutgoingPortValuesfor use in advanced helper functions
New features:
- added
ProgramTest.expectBrowserUrl - added
ProgramTest.expectBrowserHistory clickButtonon a submit button in a form will now trigger the onSubmit of the form
Bug fixes:
fillInwill now work when the target input has both anaria-labeland anid
New features:
- added
SimulatedEffect.Http.expectStringResponse - added
ProgramTest.createWorker
There are many significant changes! See Upgrading elm-program-test 2.x to 3.x for more details about the following changes.
API Changes:
- The core module is renamed from
TestContext->ProgramTest - Redesigned API for creating and starting tests
- Many assertion functions are renamed so that the API is more consistent
New features:
- support for testing HTTP requests (see
expectHttpRequestWasMadeandsimulateHttpOk) - support for testing ports (see
expectOutgoingPortValuesandsimulateIncomingPort) - support for testing
Task.sleep(seeadvanceTime)
New documentation:
- new guidebook: Testing programs with interactive views
- new guidebook: Testing programs with Cmds
- new guidebook: Testing programs with ports
- dependency on
elm/jsonis relaxed to1.0.0 <= v < 2.0.0
New features:
clickButtonnow works with non-<button>elements havingrole="button"clickButtonnow fails if the button is disabled
New features:
fillInnow works with id-less<input>tags that are descendants of their<label>fillInnow works witharia-labelattributes- added
createFailedfor use in writing helper functions that createTestContexts
New features:
- functions to simulate select/option input:
selectOption
New features:
- added
simulateLastEffect
Updated to support Elm 0.19.
New features:
- functions to simulate text input:
fillIn,fillInTextarea - functions to simulate checkbox input:
check - functions to simulate and validated clicking links:
clickLink,expectPageChange,createWithBaseUrl - functions for custom assertions:
within
Initial release