summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/toaster/tests/browser/test_layerdetails_page.py2
-rw-r--r--bitbake/lib/toaster/tests/functional/test_project_page.py8
2 files changed, 6 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/tests/browser/test_layerdetails_page.py b/bitbake/lib/toaster/tests/browser/test_layerdetails_page.py
index 69493833f4..6abfdef699 100644
--- a/bitbake/lib/toaster/tests/browser/test_layerdetails_page.py
+++ b/bitbake/lib/toaster/tests/browser/test_layerdetails_page.py
@@ -108,6 +108,8 @@ class TestLayerDetailsPage(SeleniumTestCase):
108 save_btn.click() 108 save_btn.click()
109 109
110 self.wait_until_visible("#save-changes-for-switch") 110 self.wait_until_visible("#save-changes-for-switch")
111 # Ensure scrolled into view
112 self.driver.execute_script('window.scrollTo({behavior: "instant", top: 0, left: 0})')
111 btn_save_chg_for_switch = self.wait_until_clickable( 113 btn_save_chg_for_switch = self.wait_until_clickable(
112 "#save-changes-for-switch") 114 "#save-changes-for-switch")
113 btn_save_chg_for_switch.click() 115 btn_save_chg_for_switch.click()
diff --git a/bitbake/lib/toaster/tests/functional/test_project_page.py b/bitbake/lib/toaster/tests/functional/test_project_page.py
index c6dad0eb5d..429d86feba 100644
--- a/bitbake/lib/toaster/tests/functional/test_project_page.py
+++ b/bitbake/lib/toaster/tests/functional/test_project_page.py
@@ -685,17 +685,17 @@ class TestProjectPage(TestProjectPageBase):
685 'active', str(self.find('#information').get_attribute('class')) 685 'active', str(self.find('#information').get_attribute('class'))
686 ) 686 )
687 # Check second tab (recipes) 687 # Check second tab (recipes)
688 # Ensure page is scrolled to the top
689 self.driver.find_element(By.XPATH, '//body').send_keys(Keys.CONTROL + Keys.HOME)
690 self.wait_until_visible('.nav-tabs') 688 self.wait_until_visible('.nav-tabs')
689 # Ensure page is scrolled to the top
690 self.driver.execute_script('window.scrollTo({behavior: "instant", top: 0, left: 0})')
691 tabs[1].click() 691 tabs[1].click()
692 self.assertIn( 692 self.assertIn(
693 'active', str(self.find('#recipes').get_attribute('class')) 693 'active', str(self.find('#recipes').get_attribute('class'))
694 ) 694 )
695 # Check third tab (machines) 695 # Check third tab (machines)
696 # Ensure page is scrolled to the top
697 self.driver.find_element(By.XPATH, '//body').send_keys(Keys.CONTROL + Keys.HOME)
698 self.wait_until_visible('.nav-tabs') 696 self.wait_until_visible('.nav-tabs')
697 # Ensure page is scrolled to the top
698 self.driver.execute_script('window.scrollTo({behavior: "instant", top: 0, left: 0})')
699 tabs[2].click() 699 tabs[2].click()
700 self.assertIn( 700 self.assertIn(
701 'active', str(self.find('#machines').get_attribute('class')) 701 'active', str(self.find('#machines').get_attribute('class'))