TT#70901 selenium: add tests: swap around call actions

- this test will check if options move down/up for call actions work
properly

Change-Id: I7ecfc25923e319750a0d63c908cca58d42863eea
changes/99/36899/2
Nico Schedel 6 years ago
parent 31942763d7
commit 3676eca106

@ -529,6 +529,27 @@ class testrun(unittest.TestCase):
'//*[@id="q-app"]//div[@groupname="cfu"]/div[2]//div[@class="dest-'
'row"]').text, 'then ring Voicebox', "Option 'Ring Voicebox when "
"im online' is missing")
driver.find_element_by_xpath(
'//*[@id="q-app"]//div[@groupname="cfu"]/div[1]/div[@class="q-item'
'-side q-item-side-right q-item-section dest-btns cursor-pointer"]'
).click()
driver.find_element_by_xpath(
'/html/body/div[@class="q-popover animate-scale"]/div/div[1]'
).click()
driver.implicitly_wait(2)
WebDriverWait(driver, 10).until(EC.invisibility_of_element_located((
By.XPATH, '//div[@class="q-loading animate-fade fullscreen column '
'flex-center z-maxundefined"]/svg[@class="q-spinner q-spinner-mat '
'text-white"]')))
driver.implicitly_wait(10)
self.assertEqual(driver.find_element_by_xpath(
'//*[@id="q-app"]//div[@class="dest-row own-phone-desktop"]/span'
).text, 'do not ring own phone', "Option 'do not ring own phone' "
"is missing")
self.assertEqual(driver.find_element_by_xpath(
'//*[@id="q-app"]//div[@groupname="cfu"]/div[1]//div[@class="dest-'
'row"]').text, 'first ring Voicebox', "Options did not get swapped"
)
driver.find_element_by_xpath(
'//*[@id="q-app"]//div[@class="sources-section"]/div/button'
'[@align="right"]').click()
@ -829,6 +850,27 @@ class testrun(unittest.TestCase):
'//*[@id="q-app"]//div[@groupname="cfu"]/div[2]//div[@class="dest-'
'row"]').text, 'then ring Voicebox', "Option 'Ring Voicebox when "
"im online' is missing")
driver.find_element_by_xpath(
'//*[@id="q-app"]//div[@groupname="cfu"]/div[1]/div[@class="q-item'
'-side q-item-side-right q-item-section dest-btns cursor-pointer"]'
).click()
driver.find_element_by_xpath(
'/html/body/div[@class="q-popover animate-scale"]/div/div[1]'
).click()
driver.implicitly_wait(2)
WebDriverWait(driver, 10).until(EC.invisibility_of_element_located((
By.XPATH, '//div[@class="q-loading animate-fade fullscreen column '
'flex-center z-maxundefined"]/svg[@class="q-spinner q-spinner-mat '
'text-white"]')))
driver.implicitly_wait(10)
self.assertEqual(driver.find_element_by_xpath(
'//*[@id="q-app"]//div[@class="dest-row own-phone-desktop"]/span'
).text, 'do not ring own phone', "Option 'do not ring own phone' "
"is missing")
self.assertEqual(driver.find_element_by_xpath(
'//*[@id="q-app"]//div[@groupname="cfu"]/div[1]//div[@class="dest-'
'row"]').text, 'first ring Voicebox', "Options did not get swapped"
)
driver.find_element_by_xpath(
'//*[@id="q-app"]//div[@class="sources-section"]/div/button'
'[@align="right"]').click()
@ -1123,6 +1165,27 @@ class testrun(unittest.TestCase):
'//*[@id="q-app"]//div[@groupname="cfu"]/div[2]//div[@class="dest-'
'row"]').text, 'then ring Voicebox', "Option 'Ring Voicebox when "
"im online' is missing")
driver.find_element_by_xpath(
'//*[@id="q-app"]//div[@groupname="cfu"]/div[1]/div[@class="q-item'
'-side q-item-side-right q-item-section dest-btns cursor-pointer"]'
).click()
driver.find_element_by_xpath(
'/html/body/div[@class="q-popover animate-scale"]/div/div[1]'
).click()
driver.implicitly_wait(2)
WebDriverWait(driver, 10).until(EC.invisibility_of_element_located((
By.XPATH, '//div[@class="q-loading animate-fade fullscreen column '
'flex-center z-maxundefined"]/svg[@class="q-spinner q-spinner-mat '
'text-white"]')))
driver.implicitly_wait(10)
self.assertEqual(driver.find_element_by_xpath(
'//*[@id="q-app"]//div[@class="dest-row own-phone-desktop"]/span'
).text, 'do not ring own phone', "Option 'do not ring own phone' "
"is missing")
self.assertEqual(driver.find_element_by_xpath(
'//*[@id="q-app"]//div[@groupname="cfu"]/div[1]//div[@class="dest-'
'row"]').text, 'first ring Voicebox', "Options did not get swapped"
)
driver.find_element_by_xpath(
'//*[@id="q-app"]//div[@class="sources-section"]/div/button'
'[@align="right"]').click()

Loading…
Cancel
Save