nextcloud_tests.py: Ignore warning about unset default phone region

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
This commit is contained in:
Tobias K 2021-08-06 04:44:16 +02:00 committed by nachoparker
parent b8402459b1
commit f93c183ecc

View File

@ -19,6 +19,7 @@ import os
import getopt
import configparser
import signal
import re
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
@ -145,8 +146,13 @@ def test_nextcloud(IP, nc_port, driver):
raise ConfigTestFailure("There have been errors or warnings")
infos = driver.find_elements_by_css_selector("#postsetupchecks > .info > li")
if len(infos) != 1:
raise ConfigTestFailure("Warnings are shown, but there isn't exactly one info message")
for info in infos:
if re.match(r'.*Your installation has no default phone region set.*', info.text):
continue
else:
# if len(infos) != 1:
# raise ConfigTestFailure("Warnings are shown, but there isn't exactly one info message")
php_modules = infos[0].find_elements_by_css_selector("li")
if len(php_modules) != 1: