Merge "pytest-based selenium tests add fix image modal instability"

This commit is contained in:
Zuul 2024-06-13 10:17:23 +00:00 committed by Gerrit Code Review
commit a4404445ab

View File

@ -399,6 +399,8 @@ def test_remove_protected_image_admin(login, driver, image_names,
rows = driver.find_elements_by_xpath(f"//a[text()='{image_name}']") rows = driver.find_elements_by_xpath(f"//a[text()='{image_name}']")
actions_column = rows[0].find_element_by_xpath( actions_column = rows[0].find_element_by_xpath(
".//ancestor::tr/td[contains(@class,'actions_column')]") ".//ancestor::tr/td[contains(@class,'actions_column')]")
WebDriverWait(driver, config.selenium.page_timeout).until(
EC.invisibility_of_element((By.CSS_SELECTOR, ".modal-backdrop")))
widgets.select_from_dropdown(actions_column, "Delete Image") widgets.select_from_dropdown(actions_column, "Delete Image")
widgets.confirm_modal(driver) widgets.confirm_modal(driver)
messages = widgets.get_and_dismiss_messages(driver) messages = widgets.get_and_dismiss_messages(driver)