[oe-commits] [bitbake] 17/44: toaster-tests: maximize browser window when running UI tests

git at git.openembedded.org git at git.openembedded.org
Mon Jun 13 21:11:05 UTC 2016


rpurdie pushed a commit to branch master-next
in repository bitbake.

commit 3f61bef9359926211be7a3177a2071963726ead5
Author: Elliot Smith <elliot.smith at intel.com>
AuthorDate: Tue Apr 26 17:12:52 2016 +0100

    toaster-tests: maximize browser window when running UI tests
    
    In some pages of the UI, the UI tests failed because parts of
    the UI which should be visible were being reported as not
    visible by the Selenium PhantomJS driver.
    
    On investigation, it turns out that PhantomJS uses a very narrow
    default window. This meant that some parts of the UI were being
    clipped and were thus not "visible" to the driver, causing test
    failures (specifically, on the new custom image page).
    
    Ensure that the window is maximized before running tests to
    prevent this happening.
    
    Signed-off-by: Elliot Smith <elliot.smith at intel.com>
---
 lib/toaster/tests/browser/selenium_helpers.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/toaster/tests/browser/selenium_helpers.py b/lib/toaster/tests/browser/selenium_helpers.py
index 56dbe2b..54db2e8 100644
--- a/lib/toaster/tests/browser/selenium_helpers.py
+++ b/lib/toaster/tests/browser/selenium_helpers.py
@@ -130,6 +130,7 @@ class SeleniumTestCase(StaticLiveServerTestCase):
         # instantiate the Selenium webdriver once for all the test methods
         # in this test case
         cls.driver = create_selenium_driver()
+        cls.driver.maximize_window()
 
     @classmethod
     def tearDownClass(cls):

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list