mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-04-01 23:57:05 +00:00
Merge branch 'master' into lxd
This commit is contained in:
commit
b8313cdbf7
@ -283,7 +283,7 @@ if [ -z "${DISABLE_FIREWALL:-}" ]; then
|
||||
# too. #NODOC
|
||||
SSH_PORT=$(sshd -T 2>/dev/null | grep "^port " | sed "s/port //" | tr '\n' ' ') #NODOC
|
||||
if [ -n "$SSH_PORT" ]; then
|
||||
for $port in $SSH_PORT; do
|
||||
for port in $SSH_PORT; do
|
||||
if [ "$port" != "22" ]; then
|
||||
echo "Opening alternate SSH port $port." #NODOC
|
||||
ufw_limit "$port" #NODOC
|
||||
|
@ -31,8 +31,8 @@ apt_install \
|
||||
phpenmod -v "$PHP_VER" imap
|
||||
|
||||
# Copy Z-Push into place.
|
||||
VERSION=2.7.3
|
||||
TARGETHASH=9d4bec41935e9a4e07880c5ff915bcddbda4443b
|
||||
VERSION=2.7.4
|
||||
TARGETHASH=78744d56b8799d9828ec8f99a12c1af4e9f9239b
|
||||
needs_update=0 #NODOC
|
||||
if [ ! -f /usr/local/lib/z-push/version ]; then
|
||||
needs_update=1 #NODOC
|
||||
|
@ -26,10 +26,11 @@ class NcContactsAutomation(object):
|
||||
els = d.find_els('div.contacts-list div.list-item-content,div.option__details')
|
||||
d.say_verbose('found %s contacts' % len(els))
|
||||
for el in els:
|
||||
# .line-one (nc 25+)
|
||||
# .list-item-content__name (nc 29+)
|
||||
# .line-one (nc 25-28)
|
||||
# .option__lineone (nc <25)
|
||||
fullname = el.find_el('.line-one,.option__lineone').content().strip()
|
||||
email = el.find_el('.line-two,.option__linetwo').content().strip()
|
||||
fullname = el.find_el('.line-one,.option__lineone,.list-item-content__name').content().strip()
|
||||
email = el.find_el('.line-two,.option__linetwo,.list-item-content__subname').content().strip()
|
||||
d.say_verbose('contact: "%s" <%s>', fullname, email)
|
||||
# NC 28: email not present in html
|
||||
ignore_email = True if email == '' else False
|
||||
@ -43,7 +44,7 @@ class NcContactsAutomation(object):
|
||||
d = self.d
|
||||
d.say("Wait for contact to load")
|
||||
d.wait_for_el('section.contact-details', secs=secs)
|
||||
|
||||
|
||||
def delete_current_contact(self):
|
||||
d = self.d
|
||||
d.say("Delete current contact")
|
||||
|
@ -58,7 +58,10 @@ class NextcloudAutomation(object):
|
||||
d.say("Logout of Nextcloud")
|
||||
self.click_avatar()
|
||||
|
||||
el = d.find_el('[data-id="logout"] a', throws=False) # nc < 26
|
||||
el = d.find_el('a#logout', throws=False)
|
||||
if not el:
|
||||
# nc >= 29
|
||||
el = d.find_el('[data-id="logout"] a', throws=False) # nc < 26
|
||||
if not el:
|
||||
# nc >= 26
|
||||
el = d.find_el('#logout > a', throws=False)
|
||||
@ -72,7 +75,10 @@ class NextcloudAutomation(object):
|
||||
d = self.d
|
||||
d.say("Open contacts")
|
||||
# nc 25+
|
||||
el = d.find_el('header [data-app-id="contacts"]', throws=False)
|
||||
el = d.find_el('header [title="Contacts"]', throws=False)
|
||||
if not el:
|
||||
# nc < 29
|
||||
el = d.find_el('header [data-app-id="contacts"]', throws=False)
|
||||
if not el:
|
||||
# nc < 25
|
||||
el = d.find_el('header [data-id="contacts"]')
|
||||
|
@ -7,6 +7,7 @@
|
||||
##### details.
|
||||
#####
|
||||
|
||||
|
||||
from browser.automation import (
|
||||
TestDriver,
|
||||
TimeoutException,
|
||||
@ -50,16 +51,20 @@ try:
|
||||
# open Contacts
|
||||
#
|
||||
d.start("Open contacts app")
|
||||
contacts = nc.open_contacts()
|
||||
try:
|
||||
contacts = nc.open_contacts()
|
||||
except NoSuchElementException:
|
||||
nc.close_first_run_wizard()
|
||||
contacts = nc.open_contacts()
|
||||
nc.wait_for_app_load()
|
||||
|
||||
#
|
||||
# handle selected operation
|
||||
# handle selected operation
|
||||
#
|
||||
if op=='exists':
|
||||
d.start("Check that contact %s exists", contact['email'])
|
||||
contacts.click_contact(contact) # raises NoSuchElementException if not found
|
||||
|
||||
|
||||
elif op=='delete':
|
||||
d.start("Delete contact %s", contact['email'])
|
||||
contacts.click_contact(contact)
|
||||
@ -68,7 +73,7 @@ try:
|
||||
|
||||
elif op=='nop':
|
||||
pass
|
||||
|
||||
|
||||
else:
|
||||
raise ValueError('Invalid operation: %s' % op)
|
||||
|
||||
|
@ -172,7 +172,7 @@ test_web_config() {
|
||||
record "output=$REST_OUTPUT"
|
||||
if [ $code -eq 0 ]; then
|
||||
test_failure "carddav url works, but expecting 401/NotAuthenticated from server"
|
||||
elif [ $code -eq 1 -o $REST_HTTP_CODE -ne 401 ] || ! grep "NotAuthenticated" <<<"$REST_OUTPUT" >/dev/null; then
|
||||
elif [ $REST_HTTP_CODE -ne 401 ]; then
|
||||
test_failure "carddav url doesn't work: $REST_ERROR"
|
||||
fi
|
||||
fi
|
||||
@ -189,7 +189,7 @@ test_web_config() {
|
||||
record "output=$REST_OUTPUT"
|
||||
if [ $code -eq 0 ]; then
|
||||
test_failure "caldav url works, but expecting 401/NotAuthenticated from server"
|
||||
elif [ $code -eq 1 -o $REST_HTTP_CODE -ne 401 ] || ! grep "NotAuthenticated" <<<"$REST_OUTPUT" >/dev/null; then
|
||||
elif [ $REST_HTTP_CODE -ne 401 ]; then
|
||||
test_failure "caldav url doesn't work: $REST_ERROR"
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user