From 6e9b9c866522647ba4bcec18701954b4e0817957 Mon Sep 17 00:00:00 2001 From: Martijn de Vos Date: Sat, 11 Dec 2021 16:00:31 +0100 Subject: [PATCH] Fixed channel subscribe GUI test Fixes #6630 --- src/tribler-gui/tribler_gui/tests/test_gui.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/tribler-gui/tribler_gui/tests/test_gui.py b/src/tribler-gui/tribler_gui/tests/test_gui.py index 064599e2334..277dd9a9de6 100644 --- a/src/tribler-gui/tribler_gui/tests/test_gui.py +++ b/src/tribler-gui/tribler_gui/tests/test_gui.py @@ -215,14 +215,18 @@ def tst_channels_widget(window, widget, widget_name, sort_column=1, test_filter= wait_for_list_populated(widget.content_table) if test_subscribe: - # Unsubscribe and subscribe again + widget.content_table.sortByColumn(0, 0) + wait_for_list_populated(widget.content_table) + screenshot(window, name=f"{widget_name}-sorted-on-subscribe") + # Subscribe index = get_index_of_row_column(widget.content_table, 0, widget.model.column_position[Column.VOTES]) widget.content_table.on_subscribe_control_clicked(index) QTest.qWait(200) - window.dialog.button_clicked.emit(0) - screenshot(window, name=f"{widget_name}-unsubscribed") + + # Unsubscribe widget.content_table.on_subscribe_control_clicked(index) QTest.qWait(200) + screenshot(window, name=f"{widget_name}-unsubscribed") window.dialog.button_clicked.emit(0) # Test channel view