Skip to content

Commit

Permalink
TST: use QtBot.waitUntil in RestorePage usage tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shilorigins committed Nov 8, 2024
1 parent 1ee381e commit 993a8a0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions superscore/tests/test_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,14 @@ def simple_coll_return_vals(pv_name: str):
)


def test_restore_page_toggle_live(restore_page):
def test_restore_page_toggle_live(qtbot: QtBot, restore_page):
tableView = restore_page.tableView
live_columns = tableView.live_headers
toggle_live_button = restore_page.compareLiveButton

toggle_live_button.click()
assert tableView._model._poll_thread.running
assert all((not tableView.isColumnHidden(column) for column in live_columns))
qtbot.waitUntil(lambda: tableView._model._poll_thread.running)
qtbot.waitUntil(lambda: all((not tableView.isColumnHidden(column) for column in live_columns)))

toggle_live_button.click()
assert all((tableView.isColumnHidden(column) for column in live_columns))
qtbot.waitUntil(lambda: all((tableView.isColumnHidden(column) for column in live_columns)))

0 comments on commit 993a8a0

Please sign in to comment.