TT#122872 selenium: fix admin and customer tests for master

Change-Id: Ic09bf359d112bc5619fe6bd4067b06386776927a
mr11.0
Nico Schedel 3 years ago
parent 63b04d7439
commit cd4fb65b00

@ -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(

Loading…
Cancel
Save