With the TestAttribute
module you can add attributes to your html elements only for Test
env.
This allows you to select DOM elements with these attributes for your end to end tests.
addId : String -> Env -> Html.Attribute msg
Adds a data-test-id
attribute if the Env
is Test
Conventionnally, ids can be used by only one element
addClass : String -> Env -> Html.Attribute msg
Adds a data-test-class
attribute if the Env
is Test
Conventionnally, classes can be used by several elements