From ce957f9ffe4a2425d27d73ffb661df68c8ddc8c7 Mon Sep 17 00:00:00 2001 From: Nico Schedel Date: Tue, 28 Jan 2025 15:07:16 +0100 Subject: [PATCH] MT#55677 fix contact and customer selenium tests Change-Id: I9702610be02e0b566aff0e0cc616ce3274b8080e (cherry picked from commit aaa834db91469e92450cabd502339f83960b4e2e) (cherry picked from commit 21be931798e8a549e6bf654d836c09c61fef7cc7) --- t/selenium/testrun.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/t/selenium/testrun.py b/t/selenium/testrun.py index b96b84abfe..ba5bd576f2 100644 --- a/t/selenium/testrun.py +++ b/t/selenium/testrun.py @@ -419,9 +419,9 @@ class testrun(unittest.TestCase): WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.XPATH, '/html/body//div/a[contains(., "Edit")]'))) driver.find_element(By.XPATH, '/html/body//div/a[contains(., "Edit")]').click() fill_element(driver, '//*[@id="q-app"]//div/main//form//div/label//div/input[@aria-label="Company"]', contactmail) - driver.find_element(By.XPATH, '//*[@id="q-app"]//div//main//form/div/div[1]/div/div[4]/div/label/div/div/div[2]/button').click() + driver.find_element(By.XPATH, '//button[@data-cy="aui-save-button"]').click() self.assertTrue( - driver.find_element(By.XPATH, '//*[@id="q-app"]//div/main//form//div/label//div/input[@aria-label="Company"]').get_attribute('value') == '', 'Saved value is not correct') + driver.find_element(By.XPATH, '//input[@aria-label="Company"]').get_attribute('value') == contactmail, 'Saved value is not correct') print("OK") filename = 0 @@ -595,6 +595,7 @@ class testrun(unittest.TestCase): driver.find_element(By.XPATH, '/html/body//div/a[contains(., "Preferences")]').click() print("OK") print("Try to change a setting (concurrent_max)...", end="") + driver.find_element(By.XPATH, '//button[@data-cy="aui-switch-old-panel-close"]').click() fill_element(driver, '/html/body//div//main//div//label//div/input[@aria-label="Maximum number of concurrent calls"]', 100) driver.find_element(By.XPATH, '/html/body//div//main//div//label//div//button[contains(., "Save")]').click() wait_for_invisibility(driver, '/html/body//div//main//div//label//div/svg[@class="q-spinner q-spinner-mat"]') @@ -603,16 +604,16 @@ class testrun(unittest.TestCase): 'Saved value is not correct') print("OK") print("Try to delete setting value and restoring it...", end="") - driver.find_element(By.XPATH, '/html/body//div//main//div//label//div/button[contains(., "cancel")]').click() - driver.find_element(By.XPATH, '/html/body//div//main//div//label//div//button[contains(., "Reset")]').click() + driver.find_element(By.XPATH, '//i[@aria-label="Clear"]').click() + driver.find_element(By.XPATH, '//button[@data-cy="preference-reset"]').click() wait_for_invisibility(driver, '/html/body//div//main//div//label//div/svg[@class="q-spinner q-spinner-mat"]') self.assertTrue( driver.find_element(By.XPATH, '/html/body//div//main//div//label//div/input[@aria-label="Maximum number of concurrent calls"]').get_attribute('value') == '100', 'Saved value is not correct') print("OK") print("Try to delete setting...", end="") - driver.find_element(By.XPATH, '/html/body//div//main//div//label//div/button[contains(., "cancel")]').click() - driver.find_element(By.XPATH, '/html/body//div//main//div//label//div//button[contains(., "Save")]').click() + driver.find_element(By.XPATH, '//i[@aria-label="Clear"]').click() + driver.find_element(By.XPATH, '//button[@data-cy="preference-save"]').click() wait_for_invisibility(driver, '/html/body//div//main//div//label//div/svg[@class="q-spinner q-spinner-mat"]') self.assertTrue( driver.find_element(By.XPATH, '/html/body//div//main//div//label//div/input[@aria-label="Maximum number of concurrent calls"]').get_attribute('value') == '', 'Saved value is not correct')