fixed shutdown not working on onboarding page

This commit is contained in:
Kevin Froman 2020-02-28 23:24:32 -06:00
parent 1322352fa2
commit c0def6fb7e
4 changed files with 7 additions and 3 deletions

View File

@ -19,6 +19,7 @@
<script defer src='/private/js/console.js'></script>
<script defer src='donate.js'></script>
<script defer src='onboarding.js'></script>
<script defer src="/shared/panel.js"></script>
<script>alert("Content security policy appears to not be working. Your browser security is weak!")</script>
</head>

View File

@ -23,7 +23,7 @@ restartBtn = document.getElementById('restartNode')
shutdownBtn.onclick = function(){
if (! nowebpass){
if (confirm("Really shutdown Onionr?")){
httpGet('shutdownclean')
httpGet('/shutdownclean')
overlay('shutdownNotice')
}
}

View File

@ -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()

View File

@ -1 +1 @@
1582883307
1582946012