on develop help sign in
Alter inputElement test to be slightly more interesting
commit6f06fbe3eed7a857af5ba476511b676a84bc5d4e authorTom Smalley <tfsmalley@gmail.com> dateWed 8 Jul 2020, 15:38 (6 years ago) parent2e25315
1 file changed+3−3
reflex-dom-core/test/hydration.hs+3−3
reflex-dom-core/test/hydration.hs+3−3
@@ -315,18 +315,18 @@ tests withDebugging wdConfig caps _selenium = do
315315 pure ()
316316 describe "hydration" $ session' $ do
317317 it "doesn't wipe user input when switching over" $ runWD $ do
318− inputRef <- newRef ("" :: Text)
318+ inputRef <- newRef ("hello " :: Text)
319319 testWidget'
320320 (do
321321 e <- findElemWithRetry $ WD.ByTag "input"
322− WD.sendKeys "hello world" e
322+ WD.sendKeys "world" e
323323 pure e)
324324 (\e -> do
325325 WD.attr e "value" `shouldBeWithRetryM` Just "hello world"
326326 WD.click =<< findElemWithRetry (WD.ByTag "button")
327327 readRef inputRef `shouldBeWithRetryM` "hello world"
328328 ) $ do
329− e <- inputElement def
329+ e <- inputElement $ def & inputElementConfig_initialValue .~ "hello "
330330 click <- button "save"
331331 performEvent_ $ liftIO . writeRef inputRef <$> tag (current (value e)) click
332332 it "captures user input after switchover" $ runWD $ do