Functions for the initial setup of a scenario.
Use the init function for a program created with Browser.application to set the
initial state for the scenario. You could do something like:
Spec.given (
Spec.Setup.initForApplication (App.init testFlags)
)Provide an initial program model and command. The command will be executed as the first step in the scenario script.
You might use init in conjunction with the init function of the program whose
behavior the scenario describes. In that case you could do something like:
Spec.given (
Spec.Setup.init (App.init testFlags)
)If you are describing the behavior of a program created with Browser.application then
consider using initForApplication instead.
Provide an initial model for the program whose behavior this scenario describes.
Set up the scenario to begin with a particular location.
If the program whose behavior is being described was created with Browser.application then
this Url will be provided to the init function. In any case, this location will serve as
the base href, and any location changes will be relative to this location.
By default, the scenario begins with the location http://elm-spec/
Provide the update function for the program whose behavior the scenario describes.
Provide the view function for the program whose behavior the scenario describes, where
this program is created with Browser.sandbox or Browser.element.
Provide the view function for the program whose behavior the scenario describes, where
this program is created with Browser.document or Browser.application.
Provide the subscriptions function for the program whose behavior the scenario describes.
If the scenario is describing a program created with Browser.application, you can use
this function to supply the program's onUrlChange function.
This is most useful if the scenario involves reponding to location changes.
If the scenario is describing a program created with Browser.application, you can use
this function to supply the program's onUrlRequest function.
This is most useful if the scenario involves initiating location changes.
Represents the initial state of the world for a scenario.