Skip to content

Commit c3a7403

Browse files
committed
robustify cbpu001
1 parent e0a9446 commit c3a7403

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

tests/integration/callbacks/test_prevent_update.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,15 @@ def callback2(value):
4747
dash_duo.start_server(app)
4848

4949
input_ = dash_duo.find_element("#input")
50-
input_.send_keys("xyz")
51-
dash_duo.wait_for_text_to_equal("#input", "initial inputxyz")
50+
for i, key in enumerate("xyz"):
51+
input_.send_keys(key)
52+
until(
53+
lambda: callback1_count.value == i + 2,
54+
timeout=3,
55+
msg="callback1 runs 4x (initial page load and 3x through send_keys)",
56+
)
5257

53-
until(
54-
lambda: callback1_count.value == 4,
55-
timeout=3,
56-
msg="callback1 runs 4x (initial page load and 3x through send_keys)",
57-
)
58+
dash_duo.wait_for_text_to_equal("#input", "initial inputxyz")
5859

5960
assert (
6061
callback2_count.value == 0

0 commit comments

Comments
 (0)