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
ensureViewHasNot
inside ofwithin
no longer passes whenwithin
fails to find its target. clickButton
works correctly withrole=button
elements 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
, andsimulateHttpResponse
will now fail if multiple pending requests have been made to the relevant (method, URL) pair.
New features:
- Added
expectHttpRequests
for checking whether multiple requests have been made to the same endpoint (or that zero requests have been made). - Added
simulateHttpResponseAdvanced
for simulating HTTP responses when multiple requests have been made to the same endpoint. - Added
SimulatedEffect.Time.now
clickButton
can now click buttons containing only an image with alt text
Bug fixes:
- Resolving a relative URL (such as when
clickLink
is used) is correct in more cases (specifically, when the base URL has a query or fragment string)
Packaging:
- The
HttpRequest
type 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:
clickButton
can now match<button>
androle=button
elements via theiraria-label
- added API for simulating browser navigation in
SimulatedEffect.Navigation
:back
,load
,reload
,reloadAndSkipCache
- added
ProgramTest.getOutgoingPortValues
for use in advanced helper functions
New features:
- added
ProgramTest.expectBrowserUrl
- added
ProgramTest.expectBrowserHistory
clickButton
on a submit button in a form will now trigger the onSubmit of the form
Bug fixes:
fillIn
will now work when the target input has both anaria-label
and 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
expectHttpRequestWasMade
andsimulateHttpOk
) - support for testing ports (see
expectOutgoingPortValues
andsimulateIncomingPort
) - 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/json
is relaxed to1.0.0 <= v < 2.0.0
New features:
clickButton
now works with non-<button>
elements havingrole="button"
clickButton
now fails if the button is disabled
New features:
fillIn
now works with id-less<input>
tags that are descendants of their<label>
fillIn
now works witharia-label
attributes- added
createFailed
for use in writing helper functions that createTestContext
s
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