mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-12-24 22:21:45 +03:00
Fix tests
This commit is contained in:
parent
1b5a92867e
commit
fc6cf00139
@ -13,9 +13,7 @@ import Debug.Control as Control exposing (Control)
|
||||
import Debug.Control.Extra as ControlExtra
|
||||
import Debug.Control.View as ControlView
|
||||
import Example exposing (Example)
|
||||
import Html.Styled as Html
|
||||
import KeyboardSupport exposing (Key(..))
|
||||
import Nri.Ui.Heading.V2 as Heading
|
||||
import Nri.Ui.Switch.V2 as Switch
|
||||
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
module SwitchExampleSpec exposing (suite)
|
||||
|
||||
import Accessibility.Aria as Aria
|
||||
import ProgramTest exposing (..)
|
||||
import Routes exposing (Route)
|
||||
import Test exposing (..)
|
||||
@ -20,17 +19,11 @@ suite =
|
||||
\() ->
|
||||
app route
|
||||
|> ensureViewHas [ text "Nri.Ui.Switch" ]
|
||||
-- switch starts with aria-checked=true and text "On"
|
||||
|> ensureViewHas
|
||||
[ attribute (Aria.checked (Just True))
|
||||
, text "On"
|
||||
]
|
||||
-- switch starts with checked=true
|
||||
|> ensureViewHas [ checked True ]
|
||||
-- user can click the first switch
|
||||
|> check "switch-interactive" "On" False
|
||||
-- the switch now has aria-checked=false and text "Off"
|
||||
|> ensureViewHas
|
||||
[ attribute (Aria.checked (Just False))
|
||||
, text "Off"
|
||||
]
|
||||
|> check "view-switch-example" "Show pandas in results" False
|
||||
-- the switch now has checked=false
|
||||
|> ensureViewHas [ checked False ]
|
||||
|> done
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user