Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id BF03BE00C1E; Tue, 26 Apr 2016 09:13:03 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high * trust * [134.134.136.20 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 6BCDCE00C00 for ; Tue, 26 Apr 2016 09:13:00 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP; 26 Apr 2016 09:12:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,537,1455004800"; d="scan'208";a="792792504" Received: from mkamins1-mobl.ger.corp.intel.com (HELO lp.ger.corp.intel.com) ([10.252.29.92]) by orsmga003.jf.intel.com with ESMTP; 26 Apr 2016 09:12:59 -0700 From: Elliot Smith To: toaster@yoctoproject.org Date: Tue, 26 Apr 2016 17:12:52 +0100 Message-Id: <1461687172-31204-1-git-send-email-elliot.smith@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [PATCH] toaster-tests: maximize browser window when running UI tests X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Apr 2016 16:13:03 -0000 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 --- bitbake/lib/toaster/tests/browser/selenium_helpers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bitbake/lib/toaster/tests/browser/selenium_helpers.py b/bitbake/lib/toaster/tests/browser/selenium_helpers.py index 56dbe2b..54db2e8 100644 --- a/bitbake/lib/toaster/tests/browser/selenium_helpers.py +++ b/bitbake/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): -- 1.9.3 --------------------------------------------------------------------- Intel Corporation (UK) Limited Registered No. 1134945 (England) Registered Office: Pipers Way, Swindon SN3 1RJ VAT No: 860 2173 47 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.