@@ -697,13 +697,18 @@ tests wdConfig caps _selenium = do
697697 testWidget (pure ()) checkValue $ prerender_ (pure ()) $ do
698698 (e, ()) <- selectElement def options
699699 performEvent_ $ liftIO . writeRef focusRef <$> updated (_selectElement_hasFocus e)
700+ it "has correct initial value" $ runWD $ do
701+ valueRef :: IORef Text <- newRef ""
702+ let checkValue = readRef valueRef >>= flip shouldBe "one"
703+ testWidget (pure ()) checkValue $ do
704+ prerender_ (pure ()) $ do
705+ (e, ()) <- selectElement def { _selectElementConfig_initialValue = "one" } options
706+ liftIO . writeRef valueRef <=< sample $ current $ _selectElement_value e
700707 it "sets value appropriately" $ runWD $ do
701708 valueByUIRef :: IORef Text <- newRef ""
702709 valueRef :: IORef Text <- newRef ""
703710 setValueChan :: Chan Text <- liftIO newChan
704711 let checkValue = do
705− readRef valueByUIRef >>= flip shouldBe "one"
706− readRef valueRef >>= flip shouldBe "one"
707712 WD.click <=< WD.findElem $ WD.ById "two"
708713 liftIO $ threadDelay 100000
709714 readRef valueByUIRef >>= flip shouldBe "two"
@@ -1357,8 +1362,8 @@ getFreePort = liftIO $ withSocketsDo $ do
13571362 bind sock (addrAddress addr)
13581363 return sock
13591364
1360−testWidgetDebug :: (forall m js. TestWidget js (SpiderTimeline Global) m => m ()) -> IO ()
1361−testWidgetDebug bodyWidget = do
1365+testWidgetDebug :: MonadIO n => (forall m js. TestWidget js (SpiderTimeline Global) m => m ()) -> n ()
1366+testWidgetDebug bodyWidget = liftIO $ do
13621367 let staticApp = do
13631368 el "head" $ pure ()
13641369 el "body" $ do