diff options
author | Micah Lee <micah@micahflee.com> | 2021-09-03 14:24:45 -0700 |
---|---|---|
committer | Micah Lee <micah@micahflee.com> | 2021-09-03 14:24:45 -0700 |
commit | c5c9df774a9685eb659047165750879c124a1dbf (patch) | |
tree | 7e0798f28441b5fa396046e6ce2c811bce0d99d6 /desktop/tests | |
parent | 093bf454a113e9095ce7d1ba33de3e6c6337d436 (diff) | |
download | onionshare-c5c9df774a9685eb659047165750879c124a1dbf.tar.gz onionshare-c5c9df774a9685eb659047165750879c124a1dbf.zip |
Revert "Don't show private key"
This reverts commit cf604f78f4f5734c9e53eee760bac3bc43a0512f.
Diffstat (limited to 'desktop/tests')
-rw-r--r-- | desktop/tests/gui_base_test.py | 12 | ||||
-rw-r--r-- | desktop/tests/test_gui_chat.py | 1 | ||||
-rw-r--r-- | desktop/tests/test_gui_receive.py | 1 | ||||
-rw-r--r-- | desktop/tests/test_gui_share.py | 1 | ||||
-rw-r--r-- | desktop/tests/test_gui_website.py | 1 |
5 files changed, 13 insertions, 3 deletions
diff --git a/desktop/tests/gui_base_test.py b/desktop/tests/gui_base_test.py index 6fb4fc32..83ad5fa3 100644 --- a/desktop/tests/gui_base_test.py +++ b/desktop/tests/gui_base_test.py @@ -282,6 +282,13 @@ class GuiBaseTest(unittest.TestCase): """Test that the URL instructions for sharing are showing""" self.assertTrue(tab.get_mode().server_status.url_instructions.isVisible()) + def private_key_shown(self, tab): + """Test that the Private Key is showing when not in public mode""" + if not tab.settings.get("general", "public"): + self.assertTrue(tab.get_mode().server_status.private_key.isVisible()) + else: + self.assertFalse(tab.get_mode().server_status.private_key.isVisible()) + def client_auth_instructions_shown(self, tab): """ Test that the Private Key instructions for sharing @@ -389,15 +396,14 @@ class GuiBaseTest(unittest.TestCase): self.assertFalse(tab.get_mode().server_status.url.isVisible()) self.assertFalse(tab.get_mode().server_status.url_description.isVisible()) self.assertFalse(tab.get_mode().server_status.url_instructions.isVisible()) + self.assertFalse(tab.get_mode().server_status.private_key.isVisible()) self.assertFalse( tab.get_mode().server_status.client_auth_instructions.isVisible() ) self.assertFalse( tab.get_mode().server_status.copy_client_auth_button.isVisible() ) - self.assertFalse( - tab.get_mode().server_status.show_client_auth_qr_code_button.isVisible() - ) + def web_server_is_stopped(self, tab): """Test that the web server also stopped""" diff --git a/desktop/tests/test_gui_chat.py b/desktop/tests/test_gui_chat.py index b3c72200..786782f7 100644 --- a/desktop/tests/test_gui_chat.py +++ b/desktop/tests/test_gui_chat.py @@ -41,6 +41,7 @@ class TestChat(GuiBaseTest): self.url_shown(tab) self.have_copy_url_button(tab) self.have_show_url_qr_code_button(tab) + self.private_key_shown(tab) self.client_auth_instructions_shown(tab) self.have_show_client_auth_qr_code_button(tab) self.server_status_indicator_says_started(tab) diff --git a/desktop/tests/test_gui_receive.py b/desktop/tests/test_gui_receive.py index 8520c790..ca69c957 100644 --- a/desktop/tests/test_gui_receive.py +++ b/desktop/tests/test_gui_receive.py @@ -115,6 +115,7 @@ class TestReceive(GuiBaseTest): self.have_copy_url_button(tab) self.have_show_url_qr_code_button(tab) self.client_auth_instructions_shown(tab) + self.private_key_shown(tab) self.have_show_client_auth_qr_code_button(tab) self.server_status_indicator_says_started(tab) diff --git a/desktop/tests/test_gui_share.py b/desktop/tests/test_gui_share.py index 9cd140ec..d3536569 100644 --- a/desktop/tests/test_gui_share.py +++ b/desktop/tests/test_gui_share.py @@ -186,6 +186,7 @@ class TestShare(GuiBaseTest): self.url_shown(tab) self.have_copy_url_button(tab) self.have_show_url_qr_code_button(tab) + self.private_key_shown(tab) self.client_auth_instructions_shown(tab) self.have_show_client_auth_qr_code_button(tab) self.server_status_indicator_says_started(tab) diff --git a/desktop/tests/test_gui_website.py b/desktop/tests/test_gui_website.py index 52722c2f..e736874a 100644 --- a/desktop/tests/test_gui_website.py +++ b/desktop/tests/test_gui_website.py @@ -51,6 +51,7 @@ class TestWebsite(GuiBaseTest): self.have_copy_url_button(tab) self.have_show_url_qr_code_button(tab) self.client_auth_instructions_shown(tab) + self.private_key_shown(tab) self.have_show_client_auth_qr_code_button(tab) self.server_status_indicator_says_started(tab) |