@@ -290,6 +290,29 @@ tests withDebugging wdConfig caps _selenium = do
290290 return ()
291291
292292 describe "inputElement" $ do
293+ describe "static renderer" $ session' $ do
294+ it "sets value attribute" $ runWD $ do
295+ let checkStatic = do
296+ e <- findElemWithRetry $ WD.ByTag "input"
297+ WD.attr e "value" `shouldBeWithRetryM` Just "test"
298+ pure e
299+ checkHydrated e = do
300+ WD.attr e "value" `shouldBeWithRetryM` Just "test"
301+ testWidget' checkStatic checkHydrated $ void $ inputElement $ def
302+ & inputElementConfig_initialValue .~ "test"
303+ it "updates value attribute at postBuild" $ runWD $ do
304+ let checkStatic = do
305+ e <- findElemWithRetry $ WD.ByTag "input"
306+ WD.attr e "value" `shouldBeWithRetryM` Just "test-updated"
307+ pure e
308+ checkHydrated e = do
309+ WD.attr e "value" `shouldBeWithRetryM` Just "test-updated"
310+ testWidget' checkStatic checkHydrated $ do
311+ pb <- getPostBuild
312+ _ <- inputElement $ def
313+ & inputElementConfig_initialValue .~ "test"
314+ & inputElementConfig_setValue .~ ("test-updated" <$ pb)
315+ pure ()
293316 describe "hydration" $ session' $ do
294317 it "doesn't wipe user input when switching over" $ runWD $ do
295318 inputRef <- newRef ("" :: Text)
@@ -475,6 +498,29 @@ tests withDebugging wdConfig caps _selenium = do
475498 liftIO $ writeRef filesRef names
476499
477500 describe "textAreaElement" $ do
501+ describe "static renderer" $ session' $ do
502+ it "sets value attribute" $ runWD $ do
503+ let checkStatic = do
504+ e <- findElemWithRetry $ WD.ByTag "textarea"
505+ WD.attr e "value" `shouldBeWithRetryM` Just "test"
506+ pure e
507+ checkHydrated e = do
508+ WD.attr e "value" `shouldBeWithRetryM` Just "test"
509+ testWidget' checkStatic checkHydrated $ void $ textAreaElement $ def
510+ & textAreaElementConfig_initialValue .~ "test"
511+ it "updates value attribute at postBuild" $ runWD $ do
512+ let checkStatic = do
513+ e <- findElemWithRetry $ WD.ByTag "textarea"
514+ WD.attr e "value" `shouldBeWithRetryM` Just "test-updated"
515+ pure e
516+ checkHydrated e = do
517+ WD.attr e "value" `shouldBeWithRetryM` Just "test-updated"
518+ testWidget' checkStatic checkHydrated $ do
519+ pb <- getPostBuild
520+ _ <- textAreaElement $ def
521+ & textAreaElementConfig_initialValue .~ "test"
522+ & textAreaElementConfig_setValue .~ ("test-updated" <$ pb)
523+ pure ()
478524 describe "hydration" $ session' $ do
479525 it "doesn't wipe user input when switching over" $ runWD $ do
480526 inputRef <- newRef ("" :: Text)