From c0def6fb7e85af245123a7f0e442b6c78de647f1 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Fri, 28 Feb 2020 23:24:32 -0600 Subject: [PATCH] fixed shutdown not working on onboarding page --- static-data/www/onboarding/index.html | 1 + static-data/www/shared/panel.js | 2 +- tests/browser-tests/test-circles.py | 5 ++++- tests/runtime-result.txt | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/static-data/www/onboarding/index.html b/static-data/www/onboarding/index.html index 0488d77c..e17d2fe3 100644 --- a/static-data/www/onboarding/index.html +++ b/static-data/www/onboarding/index.html @@ -19,6 +19,7 @@ + diff --git a/static-data/www/shared/panel.js b/static-data/www/shared/panel.js index 671ab40d..6410edf3 100755 --- a/static-data/www/shared/panel.js +++ b/static-data/www/shared/panel.js @@ -23,7 +23,7 @@ restartBtn = document.getElementById('restartNode') shutdownBtn.onclick = function(){ if (! nowebpass){ if (confirm("Really shutdown Onionr?")){ - httpGet('shutdownclean') + httpGet('/shutdownclean') overlay('shutdownNotice') } } diff --git a/tests/browser-tests/test-circles.py b/tests/browser-tests/test-circles.py index 5e67ab26..f1799dea 100644 --- a/tests/browser-tests/test-circles.py +++ b/tests/browser-tests/test-circles.py @@ -12,13 +12,15 @@ from subprocess import Popen import subprocess from time import sleep -from helium import start_firefox, click, Text +from helium import start_firefox, click, Text, Config from onionrcommands.openwebinterface import get_url from onionrutils import escapeansi BROWSER_HEADLESS = os.getenv('ONIONR_TEST_HEADLESS') +Config.implicit_wait_secs = 30 + def start_onionr(): testargs = ["onionr.py", "start"] with patch.object(sys, 'argv', testargs): @@ -35,6 +37,7 @@ class OnionrTests(unittest.TestCase): if Text('Get Started').exists(): click('Get Started') click('Circles') + sleep(5) if not Text('Circle Name').exists(): Popen(['./onionr.sh', 'stop']).wait() web_driver.quit() diff --git a/tests/runtime-result.txt b/tests/runtime-result.txt index 2ea789b4..fd1aa248 100644 --- a/tests/runtime-result.txt +++ b/tests/runtime-result.txt @@ -1 +1 @@ -1582883307 \ No newline at end of file +1582946012 \ No newline at end of file