Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit 2b41ea0

Browse files
committed
robustify store test_data_lifecycle
1 parent fb15aa9 commit 2b41ea0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/integration/store/test_data_lifecycle.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import dash.testing.wait as wait
2+
3+
14
def test_stdl001_data_lifecycle_with_different_condition(store_app, dash_dcc):
25
dash_dcc.start_server(store_app)
36

@@ -31,7 +34,7 @@ def test_stdl001_data_lifecycle_with_different_condition(store_app, dash_dcc):
3134
), "memory storage should contain the initial data in new tab"
3235

3336
dash_dcc.multiple_click("#btn", 2)
34-
assert dash_dcc.get_session_storage() == {"n_clicks": 2}
37+
wait.until(lambda: dash_dcc.get_session_storage() == {"n_clicks": 2}, timeout=1)
3538
assert (
3639
'"n_clicks": 2' in dash_dcc.wait_for_element("#output").text
3740
), "memory storage should reflect to the new clicks"

0 commit comments

Comments
 (0)