Fix tests
This commit is contained in:
+17
-16
@@ -45,6 +45,7 @@ entitySpec = describe "entities" $ do
|
||||
`shouldBe` S.fromList
|
||||
[ "event.bedroom_quick_remote_masse_action"
|
||||
, "event.bedroom_quick_jemina_action"
|
||||
, "event.bedroom_remote_action"
|
||||
]
|
||||
|
||||
it "bedroomPresenceController subscribes to the presence sensor" $
|
||||
@@ -89,36 +90,36 @@ buttonSpec = describe "bedroomButtonController" $ do
|
||||
let area = AreaId "makuuhuone"
|
||||
|
||||
it "Masse single click turns on his nightstand scene (lowest)" $
|
||||
services (runHASS bedroomButtonController [masseButton "1_short_release"])
|
||||
`shouldBe` [[activateScene "scene.makuuhuone_masse"]]
|
||||
concat (services (runHASS bedroomButtonController [masseButton "1_short_release"]))
|
||||
`shouldContain` [activateScene "scene.makuuhuone_masse"]
|
||||
|
||||
it "Masse double click turns on the middle scene" $
|
||||
services (runHASS bedroomButtonController [masseButton "1_double_press"])
|
||||
`shouldBe` [[activateScene "scene.makuuhuone_keski"]]
|
||||
concat (services (runHASS bedroomButtonController [masseButton "1_double_press"]))
|
||||
`shouldContain` [activateScene "scene.makuuhuone_keski"]
|
||||
|
||||
it "Masse long click turns on the bright scene" $
|
||||
services (runHASS bedroomButtonController [masseButton "1_long_press"])
|
||||
`shouldBe` [[activateScene "scene.makuuhuone_kirkas"]]
|
||||
concat (services (runHASS bedroomButtonController [masseButton "1_long_press"]))
|
||||
`shouldContain` [activateScene "scene.makuuhuone_kirkas"]
|
||||
|
||||
it "Masse off click turns the bedroom lights off" $
|
||||
services (runHASS bedroomButtonController [masseButton "2_short_release"])
|
||||
`shouldBe` [[light [area] Off]]
|
||||
concat (services (runHASS bedroomButtonController [masseButton "2_short_release"]))
|
||||
`shouldContain` [light [area] Off]
|
||||
|
||||
it "Enishen single click turns on her nightstand scene (lowest)" $
|
||||
services (runHASS bedroomButtonController [enishenButton "1_short_release"])
|
||||
`shouldBe` [[activateScene "scene.makuuhuone_jemina"]]
|
||||
concat (services (runHASS bedroomButtonController [enishenButton "1_short_release"]))
|
||||
`shouldContain` [activateScene "scene.makuuhuone_jemina"]
|
||||
|
||||
it "Enishen double click turns on the middle scene" $
|
||||
services (runHASS bedroomButtonController [enishenButton "1_double_press"])
|
||||
`shouldBe` [[activateScene "scene.makuuhuone_keski"]]
|
||||
concat (services (runHASS bedroomButtonController [enishenButton "1_double_press"]))
|
||||
`shouldContain` [activateScene "scene.makuuhuone_keski"]
|
||||
|
||||
it "Enishen long click turns on the bright scene" $
|
||||
services (runHASS bedroomButtonController [enishenButton "1_long_press"])
|
||||
`shouldBe` [[activateScene "scene.makuuhuone_kirkas"]]
|
||||
concat (services (runHASS bedroomButtonController [enishenButton "1_long_press"]))
|
||||
`shouldContain` [activateScene "scene.makuuhuone_kirkas"]
|
||||
|
||||
it "Enishen off click turns the bedroom lights off" $
|
||||
services (runHASS bedroomButtonController [enishenButton "2_short_release"])
|
||||
`shouldBe` [[light [area] Off]]
|
||||
concat (services (runHASS bedroomButtonController [enishenButton "2_short_release"]))
|
||||
`shouldContain` [light [area] Off]
|
||||
|
||||
it "ignores the initial press (scene only fires on release)" $
|
||||
services (runHASS bedroomButtonController [masseButton "1_initial_press"])
|
||||
|
||||
Reference in New Issue
Block a user