Skip to content

Commit

Permalink
confirm there are two sources before delete
Browse files Browse the repository at this point in the history
  • Loading branch information
Allie Crevier authored and sssoleileraaa committed Mar 18, 2020
1 parent 935370f commit 41f860a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/functional/test_delete_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ def check_for_sources():
first_source_widget = gui.main_view.source_list.source_widgets[first_source_id]
qtbot.mouseClick(first_source_widget, Qt.LeftButton)
qtbot.wait(1000)

assert gui.main_view.source_list.count() == 2

# Delete the first source.
# This is IMPOSSIBLE to trigger via either the qtbot or DeleteSourceAction
# instance -- hence this "direct" approach. In the end we need to know that
Expand All @@ -37,7 +40,7 @@ def check_for_sources():
controller.delete_source(conversation.conversation_title_bar.source)

def check_source_list():
# Confirm there are now only two sources in the client list.
# Confirm there is now only one source in the client list.
assert gui.main_view.source_list.count() == 1

qtbot.waitUntil(check_source_list, timeout=10000)

0 comments on commit 41f860a

Please sign in to comment.