summaryrefslogtreecommitdiff
path: root/desktop/tests/test_gui_website.py
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/tests/test_gui_website.py')
-rw-r--r--desktop/tests/test_gui_website.py30
1 files changed, 8 insertions, 22 deletions
diff --git a/desktop/tests/test_gui_website.py b/desktop/tests/test_gui_website.py
index f526756a..e736874a 100644
--- a/desktop/tests/test_gui_website.py
+++ b/desktop/tests/test_gui_website.py
@@ -11,32 +11,14 @@ class TestWebsite(GuiBaseTest):
def view_website(self, tab):
"""Test that we can download the share"""
url = f"http://127.0.0.1:{tab.app.port}/"
- if tab.settings.get("general", "public"):
- r = requests.get(url)
- else:
- r = requests.get(
- url,
- auth=requests.auth.HTTPBasicAuth(
- "onionshare", tab.get_mode().server_status.web.password
- ),
- )
-
+ r = requests.get(url)
QtTest.QTest.qWait(500, self.gui.qtapp)
self.assertTrue("This is a test website hosted by OnionShare" in r.text)
def check_csp_header(self, tab):
"""Test that the CSP header is present when enabled or vice versa"""
url = f"http://127.0.0.1:{tab.app.port}/"
- if tab.settings.get("general", "public"):
- r = requests.get(url)
- else:
- r = requests.get(
- url,
- auth=requests.auth.HTTPBasicAuth(
- "onionshare", tab.get_mode().server_status.web.password
- ),
- )
-
+ r = requests.get(url)
QtTest.QTest.qWait(500, self.gui.qtapp)
if tab.settings.get("website", "disable_csp"):
self.assertFalse("Content-Security-Policy" in r.headers)
@@ -63,10 +45,14 @@ class TestWebsite(GuiBaseTest):
self.add_remove_buttons_hidden(tab)
self.server_is_started(tab, startup_time)
self.web_server_is_running(tab)
- self.have_a_password(tab)
self.url_description_shown(tab)
+ self.url_instructions_shown(tab)
+ self.url_shown(tab)
self.have_copy_url_button(tab)
- self.have_show_qr_code_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)
def run_all_website_mode_download_tests(self, tab):