Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed on_report_sent callback in GUI tests #6364

Merged
merged 1 commit into from
Sep 24, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/tribler-gui/tribler_gui/tests/test_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,16 +410,17 @@ def screenshot_dialog():
screenshot(dialog, name="feedback_dialog")
dialog.close()

def on_report_sent(response):
assert response["sent"]
def on_report_sent():
on_report_sent.did_send_report = True
on_report_sent.did_send_report = False

dialog = FeedbackDialog(window, "Tribler GUI Test to test sending crash report works", "1.2.3", 23)
dialog.closeEvent = lambda _: None # Otherwise, the application will stop
dialog.on_report_sent = on_report_sent
QTest.mouseClick(dialog.send_report_button, Qt.LeftButton)
QTimer.singleShot(1000, screenshot_dialog)
dialog.exec_()

assert on_report_sent.did_send_report

@pytest.mark.guitest
def test_debug_pane(tribler_api, window):
Expand Down