mirror of
git://git.yoctoproject.org/poky
synced 2026-08-17 12:50:12 +00:00
bitbake: toaster/tests: Fix automated testing failures
The display window scrolling mechanism we were using was failing in one case and needed in another. After trying various approaches, this one with window.scrollTo seems to work and fixes the test failures. (Bitbake rev: f1175778108a559e1dd0d55cb68f42816c86f393) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
5049bc18a8
commit
b88519519f
@ -108,6 +108,8 @@ class TestLayerDetailsPage(SeleniumTestCase):
|
||||
save_btn.click()
|
||||
|
||||
self.wait_until_visible("#save-changes-for-switch")
|
||||
# Ensure scrolled into view
|
||||
self.driver.execute_script('window.scrollTo({behavior: "instant", top: 0, left: 0})')
|
||||
btn_save_chg_for_switch = self.wait_until_clickable(
|
||||
"#save-changes-for-switch")
|
||||
btn_save_chg_for_switch.click()
|
||||
|
||||
@ -685,17 +685,17 @@ class TestProjectPage(TestProjectPageBase):
|
||||
'active', str(self.find('#information').get_attribute('class'))
|
||||
)
|
||||
# Check second tab (recipes)
|
||||
# Ensure page is scrolled to the top
|
||||
self.driver.find_element(By.XPATH, '//body').send_keys(Keys.CONTROL + Keys.HOME)
|
||||
self.wait_until_visible('.nav-tabs')
|
||||
# Ensure page is scrolled to the top
|
||||
self.driver.execute_script('window.scrollTo({behavior: "instant", top: 0, left: 0})')
|
||||
tabs[1].click()
|
||||
self.assertIn(
|
||||
'active', str(self.find('#recipes').get_attribute('class'))
|
||||
)
|
||||
# Check third tab (machines)
|
||||
# Ensure page is scrolled to the top
|
||||
self.driver.find_element(By.XPATH, '//body').send_keys(Keys.CONTROL + Keys.HOME)
|
||||
self.wait_until_visible('.nav-tabs')
|
||||
# Ensure page is scrolled to the top
|
||||
self.driver.execute_script('window.scrollTo({behavior: "instant", top: 0, left: 0})')
|
||||
tabs[2].click()
|
||||
self.assertIn(
|
||||
'active', str(self.find('#machines').get_attribute('class'))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user