reenabled browser tests, added mail test, work on mail signatures
parent
60d2ebfaed
commit
4516cdee24
10
run_tests.sh
10
run_tests.sh
|
@ -24,9 +24,9 @@ echo "ran $ran integration tests."
|
|||
echo "total test time $SECONDS"
|
||||
ran=0;
|
||||
|
||||
#for f in tests/browser-tests/*.py; do
|
||||
# python3 "$f" || close # if needed
|
||||
# let "ran++"
|
||||
#done
|
||||
#echo "ran $ran browser tests."
|
||||
for f in tests/browser-tests/*.py; do
|
||||
python3 "$f" || close # if needed
|
||||
let "ran++"
|
||||
done
|
||||
echo "ran $ran browser tests."
|
||||
echo "total test time $SECONDS"
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
var notificationSetting = document.getElementById('notificationSetting')
|
||||
var sigSetting = document.getElementById('mailSignatureSetting')
|
||||
|
||||
document.getElementById('forwardSecrecySetting').onchange = function(e){
|
||||
postData = JSON.stringify({"default_forward_secrecy": e.target.checked})
|
||||
fetch('/config/set/mail', {
|
||||
|
@ -56,7 +58,6 @@ notificationSetting.onchange = function(e){
|
|||
"content-type": "application/json",
|
||||
"token": webpass
|
||||
}})
|
||||
.then((resp) => resp.text())
|
||||
.then(function(data) {
|
||||
mailSettings['notificationSetting'] = notificationSetting.checked
|
||||
PNotify.success({
|
||||
|
@ -64,3 +65,20 @@ notificationSetting.onchange = function(e){
|
|||
})
|
||||
})
|
||||
}
|
||||
|
||||
sigSetting.onchange = function(){
|
||||
var postData = JSON.stringify({"signature": sigSetting.value})
|
||||
fetch('/config/set/mail', {
|
||||
method: 'POST',
|
||||
body: postData,
|
||||
headers: {
|
||||
"content-type": "application/json",
|
||||
"token": webpass
|
||||
}})
|
||||
.then(function(data) {
|
||||
mailSettings['signature'] = sigSetting.value
|
||||
PNotify.success({
|
||||
text: 'Set mail signature'
|
||||
})
|
||||
})
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
from unittest.mock import patch
|
||||
import sys, os
|
||||
sys.path.append(".")
|
||||
sys.path.append("src/")
|
||||
import unittest, uuid
|
||||
TEST_DIR = 'testdata/-%s-%s' % (uuid.uuid4(), os.path.basename(__file__)) + '/'
|
||||
os.environ["ONIONR_HOME"] = TEST_DIR
|
||||
from unittest.mock import patch
|
||||
|
||||
from utils import createdirs
|
||||
|
||||
|
@ -34,8 +34,9 @@ class OnionrTests(unittest.TestCase):
|
|||
sleep(1)
|
||||
url = 'http' + escapeansi.escape_ANSI(Popen(['./onionr.sh', 'url'], stdout=subprocess.PIPE).communicate()[0].decode().split('http')[1])
|
||||
web_driver = start_firefox(url=url, headless=BROWSER_HEADLESS)
|
||||
if Text('Get Started').exists():
|
||||
if not Text('Circles').exists():
|
||||
click('Get Started')
|
||||
sleep(2)
|
||||
click('Circles')
|
||||
sleep(5)
|
||||
if not Text('Circle Name').exists():
|
||||
|
@ -45,6 +46,4 @@ class OnionrTests(unittest.TestCase):
|
|||
Popen(['./onionr.sh', 'stop']).wait()
|
||||
web_driver.quit()
|
||||
|
||||
|
||||
|
||||
unittest.main()
|
|
@ -1 +1 @@
|
|||
1583304780
|
||||
1583317276
|
Loading…
Reference in New Issue