@@ -154,13 +154,13 @@ main = do
154154 withDebugging <- isNothing <$> lookupEnv "NO_DEBUG"
155155 let wdConfig = WD.defaultConfig { WD.wdPort = fromIntegral $ _selenium_portNumber selenium }
156156 chromeCaps' = WD.getCaps $ chromeConfig browserPath chromeFlags
157− hspec (tests withDebugging wdConfig [(chromeCaps', "chrome")] selenium) `finally` _selenium_stopServer selenium
157+ hspec (tests withDebugging wdConfig [chromeCaps'] selenium) `finally` _selenium_stopServer selenium
158158
159−tests :: Bool -> WD.WDConfig -> [(Capabilities, String)] -> Selenium -> Spec
159+tests :: Bool -> WD.WDConfig -> [Capabilities] -> Selenium -> Spec
160160tests withDebugging wdConfig caps _selenium = do
161161 let putStrLnDebug :: MonadIO m => Text -> m ()
162162 putStrLnDebug m = when withDebugging $ liftIO $ putStrLn $ T.unpack m
163− session' t = sessionWith wdConfig t . using caps
163+ session' = sessionWith wdConfig "" . using (map (,"") caps)
164164 runWD m = runWDOptions (WdOptions False) $ do
165165 putStrLnDebug "before"
166166 r <- m
@@ -172,7 +172,7 @@ tests withDebugging wdConfig caps _selenium = do
172172 testWidget = testWidgetDebug True withDebugging
173173 testWidget' :: WD a -> (a -> WD b) -> (forall m js. TestWidget js (SpiderTimeline Global) m => m ()) -> WD b
174174 testWidget' = testWidgetDebug' True withDebugging
175− session' "text" $ do
175+ describe "text" $ session' $ do
176176 it "works" $ runWD $ do
177177 testWidgetStatic (checkBodyText "hello world") $ do
178178 text "hello world"
@@ -233,7 +233,7 @@ tests withDebugging wdConfig caps _selenium = do
233233 click <- button ""
234234 void $ textNode $ TextNodeConfig "initial" $ Just $ "after" <$ click
235235
236− session' "element" $ do
236+ describe "element" $ session' $ do
237237 it "works with domEvent Click" $ runWD $ do
238238 clickedRef <- liftIO $ newRef False
239239 testWidget' (findElemWithRetry $ WD.ByTag "div") WD.click $ do
@@ -297,8 +297,8 @@ tests withDebugging wdConfig caps _selenium = do
297297 let click = domEvent Click e
298298 return ()
299299
300− session' "inputElement" $ do
301− describe "static renderer" $ do
300+ describe "inputElement" $ do
301+ describe "static renderer" $ session' $ do
302302 it "sets value attribute" $ runWD $ do
303303 let checkStatic = do
304304 e <- findElemWithRetry $ WD.ByTag "input"
@@ -355,7 +355,7 @@ tests withDebugging wdConfig caps _selenium = do
355355 & inputElementConfig_initialChecked .~ False
356356 & inputElementConfig_setChecked .~ (True <$ pb)
357357 pure ()
358− describe "hydration" $ do
358+ describe "hydration" $ session' $ do
359359 it "doesn't wipe user input when switching over" $ runWD $ do
360360 inputRef <- newRef ("hello " :: Text)
361361 testWidget'
@@ -593,7 +593,8 @@ tests withDebugging wdConfig caps _selenium = do
593593 el "p" $ dynText $ _inputElement_value e
594594 performEvent_ $ consRef valRef <$> updated (_inputElement_value e)
595595 performEvent_ $ consRef inputRef <$> _inputElement_input e
596− describe "hydration/immediate" $ do
596+
597+ describe "hydration/immediate" $ session' $ do
597598 it "captures user input after switchover" $ runWD $ do
598599 inputRef :: IORef Text <- newRef ""
599600 let checkValue = do
@@ -673,8 +674,8 @@ tests withDebugging wdConfig caps _selenium = do
673674 names <- liftJSM $ traverse File.getName fs
674675 liftIO $ writeRef filesRef names
675676
676− session' "textAreaElement" $ do
677− describe "static renderer" $ do
677+ describe "textAreaElement" $ do
678+ describe "static renderer" $ session' $ do
678679 it "sets value attribute" $ runWD $ do
679680 let checkStatic = do
680681 e <- findElemWithRetry $ WD.ByTag "textarea"
@@ -697,7 +698,7 @@ tests withDebugging wdConfig caps _selenium = do
697698 & textAreaElementConfig_initialValue .~ "test"
698699 & textAreaElementConfig_setValue .~ ("test-updated" <$ pb)
699700 pure ()
700− describe "hydration" $ do
701+ describe "hydration" $ session' $ do
701702 it "doesn't wipe user input when switching over" $ runWD $ do
702703 inputRef <- newRef ("" :: Text)
703704 testWidget'
@@ -846,7 +847,7 @@ tests withDebugging wdConfig caps _selenium = do
846847 e <- textAreaElement $ def & textAreaElementConfig_setValue .~ ("pb" <$ pb)
847848 el "p" $ dynText $ _textAreaElement_value e
848849
849− describe "hydration/immediate" $ do
850+ describe "hydration/immediate" $ session' $ do
850851 it "captures user input after switchover" $ runWD $ do
851852 inputRef :: IORef Text <- newRef ""
852853 let checkValue = do
@@ -888,13 +889,13 @@ tests withDebugging wdConfig caps _selenium = do
888889 performEvent_ $ liftIO . writeRef valueByUIRef <$> _textAreaElement_input e
889890 performEvent_ $ liftIO . writeRef valueRef <$> updated (value e)
890891
891− session' "selectElement" $ do
892+ describe "selectElement" $ do
892893 let options :: DomBuilder t m => m ()
893894 options = do
894895 elAttr "option" ("value" =: "one" <> "id" =: "one") $ text "one"
895896 elAttr "option" ("value" =: "two" <> "id" =: "two") $ text "two"
896897 elAttr "option" ("value" =: "three" <> "id" =: "three") $ text "three"
897− describe "hydration" $ do
898+ describe "hydration" $ session' $ do
898899 it "sets initial value correctly" $ runWD $ do
899900 inputRef <- newRef ("" :: Text)
900901 let setup = do
@@ -968,7 +969,7 @@ tests withDebugging wdConfig caps _selenium = do
968969 performEvent_ $ liftIO . writeRef valueByUIRef <$> _selectElement_change e
969970 performEvent_ $ liftIO . writeRef valueRef <$> updated (_selectElement_value e)
970971
971− describe "hydration/immediate" $ do
972+ describe "hydration/immediate" $ session' $ do
972973 it "captures user input after switchover" $ runWD $ do
973974 inputRef :: IORef Text <- newRef ""
974975 let checkValue = do
@@ -1014,7 +1015,7 @@ tests withDebugging wdConfig caps _selenium = do
10141015 performEvent_ $ liftIO . writeRef valueByUIRef <$> _selectElement_change e
10151016 performEvent_ $ liftIO . writeRef valueRef <$> updated (_selectElement_value e)
10161017
1017− session' "prerender" $ do
1018+ describe "prerender" $ session' $ do
10181019 it "works in simple case" $ runWD $ do
10191020 testWidget (checkBodyText "One") (checkBodyText "Two") $ do
10201021 prerender_ (text "One") (text "Two")
@@ -1083,7 +1084,7 @@ tests withDebugging wdConfig caps _selenium = do
10831084 prerender_ (pure ()) (liftIO $ trigger "Client")
10841085 textNode $ TextNodeConfig "Initial" $ Just e
10851086
1086− session' "namespaces" $ do
1087+ describe "namespaces" $ session' $ do
10871088 it "dyn can be nested in namespaced widget" $ runWD $ do
10881089 testWidget (pure ()) (checkTextInTag "svg" "one") $ do
10891090 let svgRootCfg = def
@@ -1092,7 +1093,7 @@ tests withDebugging wdConfig caps _selenium = do
10921093 void $ element "svg" svgRootCfg $ do
10931094 dyn_ $ text "one" <$ pure ()
10941095
1095− session' "runWithReplace" $ do
1096+ describe "runWithReplace" $ session' $ do
10961097 it "works" $ runWD $ do
10971098 replaceChan :: Chan Text <- liftIO newChan
10981099 let setup = findElemWithRetry $ WD.ByTag "div"
@@ -1290,7 +1291,7 @@ tests withDebugging wdConfig caps _selenium = do
12901291 _ <- runWithReplace (text "inner1") $ el "p" (text "inner2") <$ replace
12911292 text "|after"
12921293
1293− session' "traverseDMapWithKeyWithAdjust" $ do
1294+ describe "traverseDMapWithKeyWithAdjust" $ session' $ do
12941295 let widget :: DomBuilder t m => DKey a -> Identity a -> m (Identity a)
12951296 widget k (Identity v) = elAttr "li" ("id" =: textKey k) $ do
12961297 elClass "span" "key" $ text $ textKey k
@@ -1393,7 +1394,7 @@ tests withDebugging wdConfig caps _selenium = do
13931394 (dmap, _evt) <- traverseDMapWithKeyWithAdjust widget keyMap $ leftmost [postBuildPatch <$ pb, replace]
13941395 liftIO $ dmap `H.shouldBe` keyMap
13951396
1396− session' "traverseIntMapWithKeyWithAdjust" $ do
1397+ describe "traverseIntMapWithKeyWithAdjust" $ session' $ do
13971398 let textKeyInt k = "key" <> T.pack (show k)
13981399 intMap = IntMap.fromList
13991400 [ (1, "one")
@@ -1500,7 +1501,7 @@ tests withDebugging wdConfig caps _selenium = do
15001501 (dmap, _evt) <- traverseIntMapWithKeyWithAdjust widget intMap $ leftmost [postBuildPatch <$ pb, replace]
15011502 liftIO $ dmap `H.shouldBe` intMap
15021503
1503− session' "traverseDMapWithKeyWithAdjustWithMove" $ do
1504+ describe "traverseDMapWithKeyWithAdjustWithMove" $ session' $ do
15041505 let widget :: DomBuilder t m => Key2 a -> Identity a -> m (Identity a)
15051506 widget k (Identity v) = elAttr "li" ("id" =: textKey2 k) $ do
15061507 elClass "span" "key" $ text $ textKey2 k
@@ -1580,8 +1581,8 @@ tests withDebugging wdConfig caps _selenium = do
15801581 (dmap, _evt) <- traverseDMapWithKeyWithAdjustWithMove widget initMap =<< triggerEventWithChan chan
15811582 liftIO $ assertEqual "DMap" initMap dmap
15821583
1583− session' "hydrating invalid HTML" $ do
1584− xit "can hydrate list in paragraph" $ runWD $ do
1584+ describe "hydrating invalid HTML" $ session' $ do
1585+ it "can hydrate list in paragraph" $ runWD $ do
15851586 let preSwitchover = do
15861587 checkBodyText "before\ninner\nafter"
15871588 -- Two <p> tags should be present
@@ -1610,7 +1611,7 @@ tests withDebugging wdConfig caps _selenium = do
16101611 -- TODO: This test presupposes the exact set of labels that "dropdown" places in the "value" fields to distinguish options.
16111612 -- This dependence on internal implementation details is undesirable in a test case, but seems fairly tricky to avoid.
16121613 -- It seems expedient for the time being to expect this test case to be updated, should those implementation details ever change.
1613− session' "dropdown" $ do
1614+ describe "dropdown" $ session' $ do
16141615 let doTest expectedOpts (initialValue :: Text) = do
16151616 let doCheck = do
16161617 es <- findElemsWithRetry $ WD.ByTag "option"