From cd4fb65b0046be3416014c690e269030eb9b8a19 Mon Sep 17 00:00:00 2001 From: Nico Schedel Date: Wed, 10 Aug 2022 13:36:12 +0200 Subject: [PATCH] TT#122872 selenium: fix admin and customer tests for master Change-Id: Ic09bf359d112bc5619fe6bd4067b06386776927a --- t/selenium/testrun.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/t/selenium/testrun.py b/t/selenium/testrun.py index 5c654212ae..22d5c75d4c 100644 --- a/t/selenium/testrun.py +++ b/t/selenium/testrun.py @@ -243,8 +243,8 @@ class testrun(unittest.TestCase): self.assertTrue( len(driver.find_elements_by_xpath('//*[@id="q-app"]/div//main/div//table/tbody/tr[1]/td[contains(., "' + adminname + '")]')) > 0, "Administrator was not found") driver.find_element_by_xpath('//*[@id="q-app"]/div//main//div/table/tbody/tr[1]/td[2]').click() - WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.XPATH, '//div[@data-cy="aui-popup-menu-item--delete"]'))) - driver.find_element_by_xpath('//div[@data-cy="aui-popup-menu-item--delete"]').click() + WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.XPATH, '//div[@data-cy="aui-data-table-row-menu--delete"]'))) + driver.find_element_by_xpath('//div[@data-cy="aui-data-table-row-menu--delete"]').click() WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.XPATH, '//button[@data-cy="btn-confirm"]'))) driver.find_element_by_xpath('//button[@data-cy="btn-confirm"]').click() wait_for_invisibility(driver, '/html/body//div/main//div/label//div/input[contains(@class, "q-field--disabled")]') @@ -257,8 +257,8 @@ class testrun(unittest.TestCase): self.assertTrue( len(driver.find_elements_by_xpath('//*[@id="q-app"]/div//main/div//table/tbody/tr[1]/td[contains(., "' + adminname2 + '")]')) > 0, "Administrator was not found") driver.find_element_by_xpath('//*[@id="q-app"]/div//main//div/table/tbody/tr[1]/td[2]').click() - WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.XPATH, '//div[@data-cy="aui-popup-menu-item--delete"]'))) - driver.find_element_by_xpath('//div[@data-cy="aui-popup-menu-item--delete"]').click() + WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.XPATH, '//div[@data-cy="aui-data-table-row-menu--delete"]'))) + driver.find_element_by_xpath('//div[@data-cy="aui-data-table-row-menu--delete"]').click() WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.XPATH, '//button[@data-cy="btn-confirm"]'))) driver.find_element_by_xpath('//button[@data-cy="btn-confirm"]').click() wait_for_invisibility(driver, '/html/body//div/main//div/label//div/input[contains(@class, "q-field--disabled")]') @@ -582,6 +582,10 @@ class testrun(unittest.TestCase): print("OK") print("Check if customer has been created...", end="") wait_for_invisibility(driver, '/html/body//div/main//div/label//div/input[contains(@class, "q-field--disabled")]') + driver.find_element_by_xpath('//label[@data-cy="aui-data-table-filter-criteria"]').click() + time.sleep(1) + driver.find_element_by_xpath('//div[@data-cy="q-item--2"]').click() + 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'))) fill_element(driver, '/html/body//div/main//div/label//div/input', customername) self.assertTrue(