mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-04-01 23:57:05 +00:00
QA: updates for recent nextcloud changes
This commit is contained in:
parent
7e4b4ba70c
commit
62b691f44a
@ -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