]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toaster-tests: maximize browser window when running UI tests
authorElliot Smith <elliot.smith@intel.com>
Tue, 26 Apr 2016 16:12:52 +0000 (17:12 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 13 Jun 2016 21:04:30 +0000 (22:04 +0100)
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@intel.com>
lib/toaster/tests/browser/selenium_helpers.py

index 56dbe2b3445952ebb16409dce5fa21a149aea0f5..54db2e8cf2e54daa684f7e1de14c10bffb2ce800 100644 (file)
@@ -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):