Skip to content

Commit

Permalink
Merge pull request #6643 from devos50/fix_gui_test_channel_subscribe_…
Browse files Browse the repository at this point in the history
…dialog

Fixed channel subscribe GUI test
  • Loading branch information
devos50 authored Dec 11, 2021
2 parents 3419e31 + 6e9b9c8 commit 0e7fba3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/tribler-gui/tribler_gui/tests/test_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0e7fba3

Please sign in to comment.