From 40909df586ec4dd42f376b6b34dc1692b652f6d0 Mon Sep 17 00:00:00 2001 From: Nico Schedel Date: Wed, 31 May 2023 12:57:53 +0200 Subject: [PATCH] MT#55491 fix tests for mr10.5 point releases Change-Id: Ib34b731edf79c26a38905a7ffa8beabb66df4cca --- t/selenium/functions/Collections.py | 4 ++-- t/selenium/testrun.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/t/selenium/functions/Collections.py b/t/selenium/functions/Collections.py index de1cee3bf9..2a7b73d9a8 100644 --- a/t/selenium/functions/Collections.py +++ b/t/selenium/functions/Collections.py @@ -62,8 +62,8 @@ def delete_reseller(driver, reseller): WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.XPATH, '//*[@id="q-app"]/div/div[2]/main/div[1]/div/div[1]/table/tbody/tr[1]/td[contains(., "' + reseller + '")]'))) WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, '//*[@id="q-app"]/div/div[2]/main/div[1]/div/div[1]/table/tbody/tr[1]/td[2]/button'))) driver.find_element_by_xpath('//*[@id="q-app"]/div/div[2]/main/div[1]/div/div[1]/table/tbody/tr[1]/td[2]/button').click() - WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.XPATH, '/html/body/div[4]/div/div'))) - driver.find_element_by_xpath('/html/body/div[4]/div/div').click() + WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.XPATH, '/html/body//div[@data-cy="aui-data-table-row-menu--delete"]'))) + driver.find_element_by_xpath('/html/body//div[@data-cy="aui-data-table-row-menu--delete"]').click() WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.XPATH, '/html/body/div[4]/div[2]/div/div[3]/button[2]'))) driver.find_element_by_xpath('/html/body/div[4]/div[2]/div/div[3]/button[2]').click() wait_for_invisibility(driver, '/html/body//div[@class="q-virtual-scroll__content"]/div[1]') diff --git a/t/selenium/testrun.py b/t/selenium/testrun.py index 82845bbb66..be117201e8 100644 --- a/t/selenium/testrun.py +++ b/t/selenium/testrun.py @@ -152,6 +152,7 @@ class testrun(unittest.TestCase): driver.find_element_by_xpath('//div[@data-cy="aui-main-menu-items--settings"]').click() WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, '//*[@id="q-app"]//div//aside//div//a[contains(., "Administrators")]'))) driver.find_element_by_xpath('//*[@id="q-app"]//div//aside//div//a[contains(., "Administrators")]').click() + """ print("Try to enable 'Customer Care'...", end="") wait_for_invisibility(driver, '/html/body//div/main//div/label//div/input[contains(@class, "q-field--disabled")]') WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, '/html/body//div/main//div/label//div/input'))) @@ -186,6 +187,7 @@ class testrun(unittest.TestCase): WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, '//*[@id="q-app"]//div//aside//div//a[contains(., "Administrators")]'))) driver.find_element_by_xpath('//*[@id="q-app"]//div//aside//div//a[contains(., "Administrators")]').click() print("OK") + """ print("Try to enable 'Read-only'...", end="") wait_for_invisibility(driver, '/html/body//div/main//div/label//div/input[contains(@class, "q-field--disabled")]') WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, '/html/body//div/main//div/label//div/input')))