diff options
author | Miguel Jacq <mig@mig5.net> | 2020-05-31 17:44:57 +1000 |
---|---|---|
committer | Miguel Jacq <mig@mig5.net> | 2020-05-31 17:44:57 +1000 |
commit | 4cf508ed8e05fc38762ca49942d3a83a3d8123f5 (patch) | |
tree | 7915ab91c68b8802c4ba5100693629173cc47eef /tests | |
parent | 1c424500f0b0e1e2bb7b17ce144cce16e20e5493 (diff) | |
download | onionshare-4cf508ed8e05fc38762ca49942d3a83a3d8123f5.tar.gz onionshare-4cf508ed8e05fc38762ca49942d3a83a3d8123f5.zip |
#1115 Add QR Code for onion URL
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gui_base_test.py | 11 | ||||
-rw-r--r-- | tests/test_gui_receive.py | 1 | ||||
-rw-r--r-- | tests/test_gui_share.py | 1 | ||||
-rw-r--r-- | tests/test_gui_website.py | 1 |
4 files changed, 14 insertions, 0 deletions
diff --git a/tests/gui_base_test.py b/tests/gui_base_test.py index 87353cd7..f1a4efac 100644 --- a/tests/gui_base_test.py +++ b/tests/gui_base_test.py @@ -297,6 +297,17 @@ class GuiBaseTest(unittest.TestCase): f"http://onionshare:{tab.get_mode().server_status.web.password}@127.0.0.1:{tab.app.port}", ) + def have_show_qr_code_button(self, tab): + """Test that the Show QR Code URL button is shown and that it loads a QR Code Dialog""" + self.assertTrue(tab.get_mode().server_status.show_url_qr_code_button.isVisible()) + def accept_dialog(): + window = tab.common.gui.qtapp.activeWindow() + if window: + window.close() + + QtCore.QTimer.singleShot(500, accept_dialog) + tab.get_mode().server_status.show_url_qr_code_button.click() + def server_status_indicator_says_started(self, tab): """Test that the Server Status indicator shows we are started""" if type(tab.get_mode()) == ReceiveMode: diff --git a/tests/test_gui_receive.py b/tests/test_gui_receive.py index 4ee0abd8..bd9cf491 100644 --- a/tests/test_gui_receive.py +++ b/tests/test_gui_receive.py @@ -112,6 +112,7 @@ class TestReceive(GuiBaseTest): self.have_a_password(tab) self.url_description_shown(tab) self.have_copy_url_button(tab) + self.have_show_qr_code_button(tab) self.server_status_indicator_says_started(tab) self.web_page(tab, "Select the files you want to send, then click") diff --git a/tests/test_gui_share.py b/tests/test_gui_share.py index c8b6292a..8e814248 100644 --- a/tests/test_gui_share.py +++ b/tests/test_gui_share.py @@ -231,6 +231,7 @@ class TestShare(GuiBaseTest): self.have_a_password(tab) self.url_description_shown(tab) self.have_copy_url_button(tab) + self.have_show_qr_code_button(tab) self.server_status_indicator_says_started(tab) def run_all_share_mode_download_tests(self, tab): diff --git a/tests/test_gui_website.py b/tests/test_gui_website.py index c88a4910..bc6e16ea 100644 --- a/tests/test_gui_website.py +++ b/tests/test_gui_website.py @@ -70,6 +70,7 @@ class TestWebsite(GuiBaseTest): self.have_a_password(tab) self.url_description_shown(tab) self.have_copy_url_button(tab) + self.have_show_qr_code_button(tab) self.server_status_indicator_says_started(tab) def run_all_website_mode_download_tests(self, tab): |