Skip to content

Commit

Permalink
Modifies test to ensure using set_progress(no_update) does not reset …
Browse files Browse the repository at this point in the history
…progress
  • Loading branch information
leeagustin committed Jun 26, 2024
1 parent 81f648a commit 7437e2b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
7 changes: 4 additions & 3 deletions tests/integration/long_callback/app_progress_delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@
)
def on_bg_progress(set_progress, _):
set_progress("start")
time.sleep(1)
set_progress(no_update)
time.sleep(1)
time.sleep(2)
set_progress("stop")
time.sleep(2)
set_progress(no_update)
return "done"


if __name__ == "__main__":
app.run_server(debug=True)
application = app.server
12 changes: 11 additions & 1 deletion tests/integration/long_callback/test_basic_long_callback014.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,17 @@
def test_lcbc014_progress_delete(dash_duo, manager):
with setup_long_callback_app(manager, "app_progress_delete") as app:
dash_duo.start_server(app)

dash_duo.wait_for_text_to_equal("#progress-output", "")
assert dash_duo.find_element("#progress-counter").text == "0"

dash_duo.find_element("#start").click()
dash_duo.wait_for_text_to_equal("#output", "done")

dash_duo.wait_for_text_to_equal("#progress-output", "start")
assert dash_duo.find_element("#progress-counter").text == "1"

dash_duo.wait_for_text_to_equal("#progress-output", "stop")
assert dash_duo.find_element("#progress-counter").text == "2"

dash_duo.wait_for_text_to_equal("#output", "done")
assert dash_duo.find_element("#progress-counter").text == "2"

0 comments on commit 7437e2b

Please sign in to comment.