@@ -1129,7 +1129,7 @@ tests wdConfig caps _selenium = do
11291129 (dmap, _evt) <- traverseIntMapWithKeyWithAdjust widget intMap $ leftmost [postBuildPatch <$ pb, replace]
11301130 liftIO $ dmap `H.shouldBe` intMap
11311131
1132− describe "traverseDMapWithKeyWithAdjustWithMove" $ do
1132+ describe "traverseDMapWithKeyWithAdjustWithMove" $ session' $ do
11331133 let widget :: DomBuilder t m => Key2 a -> Identity a -> m (Identity a)
11341134 widget k (Identity v) = elAttr "li" ("id" =: textKey k) $ do
11351135 elClass "span" "key" $ text $ textKey k
@@ -1171,19 +1171,19 @@ tests wdConfig caps _selenium = do
11711171 e <- WD.findElem (WD.ById $ textKey k)
11721172 checkItem e (textKey k) (T.pack $ show v)
11731173 moveSpec testMove = do
1174− it "can insert an item" $ testMove (DMap.fromList [Key2_Int 1 ==> 1, Key2_Int 3 ==> 3]) $ \body chan -> do
1174+ it "can insert an item" $ runWD $ testMove (DMap.fromList [Key2_Int 1 ==> 1, Key2_Int 3 ==> 3]) $ \body chan -> do
11751175 shouldContainText (T.strip $ T.unlines ["i11","i33"]) body
11761176 liftIO $ writeChan chan (insertDMapKey (Key2_Int 2) 2)
11771177 shouldContainText (T.strip $ T.unlines ["i11","i22","i33"]) body
1178− it "can delete an item" $ testMove (DMap.fromList [Key2_Int 1 ==> 1, Key2_Int 2 ==> 2, Key2_Int 3 ==> 3]) $ \body chan -> do
1178+ it "can delete an item" $ runWD $ testMove (DMap.fromList [Key2_Int 1 ==> 1, Key2_Int 2 ==> 2, Key2_Int 3 ==> 3]) $ \body chan -> do
11791179 shouldContainText (T.strip $ T.unlines ["i11","i22","i33"]) body
11801180 liftIO $ writeChan chan (deleteDMapKey (Key2_Int 2))
11811181 shouldContainText (T.strip $ T.unlines ["i11","i33"]) body
1182− it "can swap items" $ testMove (DMap.fromList [Key2_Int 1 ==> 1, Key2_Int 2 ==> 2, Key2_Int 3 ==> 3, Key2_Int 4 ==> 4]) $ \body chan -> do
1182+ it "can swap items" $ runWD $ testMove (DMap.fromList [Key2_Int 1 ==> 1, Key2_Int 2 ==> 2, Key2_Int 3 ==> 3, Key2_Int 4 ==> 4]) $ \body chan -> do
11831183 shouldContainText (T.strip $ T.unlines ["i11","i22","i33","i44"]) body
11841184 liftIO $ writeChan chan (swapDMapKey (Key2_Int 2) (Key2_Int 3))
11851185 shouldContainText (T.strip $ T.unlines ["i11","i33","i22","i44"]) body
1186− it "can move items" $ testMove (DMap.fromList [Key2_Int 1 ==> 1, Key2_Int 2 ==> 2, Key2_Int 3 ==> 3, Key2_Int 4 ==> 4]) $ \body chan -> do
1186+ it "can move items" $ runWD $ testMove (DMap.fromList [Key2_Int 1 ==> 1, Key2_Int 2 ==> 2, Key2_Int 3 ==> 3, Key2_Int 4 ==> 4]) $ \body chan -> do
11871187 shouldContainText (T.strip $ T.unlines ["i11","i22","i33", "i44"]) body
11881188 liftIO $ writeChan chan (moveDMapKey (Key2_Int 2) (Key2_Int 3))
11891189 shouldContainText (T.strip $ T.unlines ["i11","i22","i44"]) body
@@ -1195,7 +1195,7 @@ tests wdConfig caps _selenium = do
11951195 shouldContainText (T.strip $ T.unlines ["i11","i22","i44"]) body
11961196
11971197 describe "hydration" $ moveSpec $ \initMap test -> do
1198− chan <- newChan
1198+ chan <- liftIO newChan
11991199 let static = getAndCheckInitialItems initMap
12001200 check xs = do
12011201 checkInitialItems initMap xs
@@ -1203,12 +1203,12 @@ tests wdConfig caps _selenium = do
12031203 test body chan
12041204 testWidget' static check $ void $ do
12051205 (dmap, _evt) <- traverseDMapWithKeyWithAdjustWithMove widget initMap =<< triggerEventWithChan chan
1206− liftIO $ dmap `shouldBe` initMap
1206+ liftIO $ assertEqual "DMap" initMap dmap
12071207
12081208 describe "hydration/immediate" $ moveSpec $ \initMap test -> do
1209− chan <- newChan
1210− replace <- newChan
1211− lock <- newEmptyMVar
1209+ chan <- liftIO newChan
1210+ replace <- liftIO newChan
1211+ lock <- liftIO newEmptyMVar
12121212 let check = do
12131213 liftIO $ do
12141214 writeChan replace ()
@@ -1223,7 +1223,7 @@ tests wdConfig caps _selenium = do
12231223 pb <- getPostBuild
12241224 performEvent_ $ liftIO (putMVar lock ()) <$ pb
12251225 (dmap, _evt) <- traverseDMapWithKeyWithAdjustWithMove widget initMap =<< triggerEventWithChan chan
1226− liftIO $ dmap `shouldBe` initMap
1226+ liftIO $ assertEqual "DMap" initMap dmap
12271227
12281228data Selenium = Selenium
12291229 { _selenium_portNumber :: PortNumber