mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-11-11 03:28:09 +03:00
Adds test against clicking straight through the modals
This commit is contained in:
parent
3d988ba028
commit
71a8772f67
@ -44,6 +44,21 @@ all =
|
||||
, Query.hasNot [ text "Title2", text "Content2" ]
|
||||
, Query.hasNot [ text "Title3", text "Content3" ]
|
||||
]
|
||||
, test "can click through" <|
|
||||
\() ->
|
||||
{ panels = threePanels
|
||||
, height = Css.vh 60
|
||||
, parentMsg = identity
|
||||
}
|
||||
|> initTest
|
||||
|> click "Continue1"
|
||||
|> click "Continue2"
|
||||
|> click "Continue3"
|
||||
|> assertAndFinish
|
||||
[ Query.hasNot [ text "Title1", text "Content1" ]
|
||||
, Query.hasNot [ text "Title2", text "Content2" ]
|
||||
, Query.hasNot [ text "Title3", text "Content3" ]
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
@ -105,8 +120,8 @@ simulate findElement event testContext =
|
||||
}
|
||||
|
||||
|
||||
assert : List (Query.Single SlideModal.State -> Expectation) -> TestContext -> Expectation
|
||||
assert expectations { view, state } =
|
||||
assertAndFinish : List (Query.Single SlideModal.State -> Expectation) -> TestContext -> Expectation
|
||||
assertAndFinish expectations { view, state } =
|
||||
case Result.map view state of
|
||||
Ok query ->
|
||||
Expect.all expectations query
|
||||
|
Loading…
Reference in New Issue
Block a user