Fix ui-tests by removing no longer present checks

This commit is contained in:
Théophile Diot 2023-04-29 17:13:55 +02:00
parent c8908695be
commit 08e1d157d7
No known key found for this signature in database
GPG key ID: E752C80DB72BB014

View file

@ -173,7 +173,7 @@ try:
) as driver:
driver.delete_all_cookies()
driver.maximize_window()
driver_wait = WebDriverWait(driver, 15)
driver_wait = WebDriverWait(driver, 30)
print("Navigating to http://www.example.com/admin ...", flush=True)
@ -424,7 +424,7 @@ try:
buttons = safe_get_element(
driver,
By.XPATH,
"//div[@global-config-tabs-desktop='']/button",
"//div[@data-global-config-tabs-desktop='']/button",
multiple=True,
)
buttons.reverse()
@ -606,51 +606,9 @@ try:
print("The value is not the expected one, exiting ...", flush=True)
exit(1)
no_errors = True
retries = 0
while no_errors:
try:
print(
"The value is the expected one, trying to save without changes ...",
flush=True,
)
access_page(
driver,
driver_wait,
"//button[@data-services-modal-submit='']",
"services",
False,
)
print(
"The page reloaded successfully, checking the message ...",
flush=True,
)
assert_alert_message(
driver, "was not edited because no values were changed."
)
no_errors = False
except:
if retries >= 3:
exit(1)
retries += 1
print(
"WARNING: message list doesn't contain the expected message or is empty, retrying..."
)
try:
service = safe_get_element(
driver, By.XPATH, "//div[@data-services-service='']", error=True
)
except TimeoutException:
print("Services not found, exiting ...", flush=True)
exit(1)
assert_button_click(service, ".//button[@data-services-action='edit']")
assert_button_click(
driver, "//button[@data-services-modal-close='']/*[local-name() = 'svg']"
)
print("Creating a new service ...", flush=True)
@ -824,7 +782,8 @@ try:
print("Trying to create a new config ...", flush=True)
assert_button_click(
driver, "//div[@data-configs-element='server-http' and @_type='folder']"
driver,
"//div[@data-configs-element='server-http' and @data-_type='folder']",
)
assert_button_click(driver, "//li[@data-configs-add-file='']/button")
@ -974,7 +933,7 @@ try:
external_plugins = safe_get_element(
driver,
By.XPATH,
"//div[@data-plugins-external=' external ']",
"//div[@data-plugins-external='external']",
multiple=True,
)