File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -255,7 +255,7 @@ async def on_change(event):
255255 assert message_ref .current == "this is a test"
256256
257257
258- def test_double_set_state (driver , display ):
258+ def test_double_set_state (driver , driver_wait , display ):
259259 @idom .component
260260 def SomeComponent ():
261261 state_1 , set_state_1 = idom .hooks .use_state (0 )
@@ -282,13 +282,13 @@ def double_set_state(event):
282282
283283 button .click ()
284284
285- assert first .get_attribute ("value" ) == "1"
286- assert second .get_attribute ("value" ) == "1"
285+ assert driver_wait . until ( lambda _ : first .get_attribute ("value" ) == "1" )
286+ assert driver_wait . until ( lambda _ : second .get_attribute ("value" ) == "1" )
287287
288288 button .click ()
289289
290- assert first .get_attribute ("value" ) == "2"
291- assert second .get_attribute ("value" ) == "2"
290+ assert driver_wait . until ( lambda _ : first .get_attribute ("value" ) == "2" )
291+ assert driver_wait . until ( lambda _ : second .get_attribute ("value" ) == "2" )
292292
293293
294294async def test_use_effect_callback_occurs_after_full_render_is_complete ():
You can’t perform that action at this time.
0 commit comments