Skip to content

Commit

Permalink
fix counter test
Browse files Browse the repository at this point in the history
  • Loading branch information
martinxu9 committed Feb 14, 2024
1 parent 4679f86 commit 4223b0d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions counter/tests/test_counter.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ def test_counter_app(counter_app: AppHarness):

state_manager = counter_app.app_instance.state_manager
assert len(counter_app.poll_for_clients()) == 1
backend_state = list(state_manager.states.values())[0].get_substate(["state", "state"])
backend_state = list(state_manager.states.values())[0].get_substate(
["state", "state"]
)

count = driver.find_element(By.TAG_NAME, "h2")
count = driver.find_element(By.TAG_NAME, "h1")
assert counter_app.poll_for_content(count) == "0"

buttons = driver.find_elements(By.TAG_NAME, "button")
Expand All @@ -45,4 +47,4 @@ def test_counter_app(counter_app: AppHarness):
assert counter_app.poll_for_content(count, exp_not_equal=random_count) == dec_value
increment.click()
assert counter_app.poll_for_content(count, exp_not_equal=dec_value) == random_count
assert count.text == random_count
assert count.text == random_count

0 comments on commit 4223b0d

Please sign in to comment.