@@ -16,9 +16,7 @@ def test_stdl001_data_lifecycle_with_different_condition(store_app, dash_dcc):
16
16
}, "session storage should contain the same click nums"
17
17
18
18
dash_dcc .driver .refresh ()
19
- assert dash_dcc .find_element ("#output" ).text == '"{}"' .format (
20
- store_app .uuid
21
- ), "a browser refresh will clear the memory type data to initial data"
19
+ dash_dcc .wait_for_text_to_equal ("#output" , '"{}"' .format (store_app .uuid ))
22
20
assert dash_dcc .get_local_storage () == {"n_clicks" : nclicks }
23
21
assert dash_dcc .get_session_storage () == {"n_clicks" : nclicks }
24
22
@@ -27,9 +25,7 @@ def test_stdl001_data_lifecycle_with_different_condition(store_app, dash_dcc):
27
25
assert dash_dcc .get_local_storage () == {
28
26
"n_clicks" : nclicks
29
27
}, "local storage should be persistent"
30
- assert dash_dcc .find_element ("#output" ).text == '"{}"' .format (
31
- store_app .uuid
32
- ), "memory storage should contain the initial data in new tab"
28
+ dash_dcc .wait_for_text_to_equal ("#output" , '"{}"' .format (store_app .uuid ))
33
29
34
30
dash_dcc .multiple_click ("#btn" , 2 )
35
31
wait .until (lambda : dash_dcc .get_session_storage () == {"n_clicks" : 2 }, timeout = 1 )
@@ -40,9 +36,7 @@ def test_stdl001_data_lifecycle_with_different_condition(store_app, dash_dcc):
40
36
dash_dcc .driver .close ()
41
37
dash_dcc .switch_window ()
42
38
assert dash_dcc .get_local_storage () == {"n_clicks" : 2 }
43
- assert dash_dcc .find_element ("#output" ).text == '"{}"' .format (
44
- store_app .uuid
45
- ), "memory output should be the same as after previous refresh"
39
+ dash_dcc .wait_for_text_to_equal ("#output" , '"{}"' .format (store_app .uuid ))
46
40
assert dash_dcc .get_session_storage () == {
47
41
"n_clicks" : nclicks
48
42
}, "session storage should be specific per browser tab window"
0 commit comments