Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id D38B7E00DE0; Thu, 28 Apr 2016 06:23:56 -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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 017F0E00DCB for ; Thu, 28 Apr 2016 06:23:39 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP; 28 Apr 2016 06:23:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,546,1455004800"; d="scan'208";a="968403051" Received: from irsmsx105.ger.corp.intel.com ([163.33.3.28]) by fmsmga002.fm.intel.com with ESMTP; 28 Apr 2016 06:23:39 -0700 Received: from irsmsx110.ger.corp.intel.com ([169.254.15.10]) by irsmsx105.ger.corp.intel.com ([169.254.7.35]) with mapi id 14.03.0248.002; Thu, 28 Apr 2016 14:23:36 +0100 From: "Barros Pena, Belen" To: "Smith, Elliot" , "toaster@yoctoproject.org" Thread-Topic: [Toaster] [PATCH] toaster-tests: maximize browser window when running UI tests Thread-Index: AQHRoVErdlChaVjamUWTV9FffBt23w== Date: Thu, 28 Apr 2016 13:23:36 +0000 Message-ID: References: <1461687172-31204-1-git-send-email-elliot.smith@intel.com> In-Reply-To: <1461687172-31204-1-git-send-email-elliot.smith@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.6.3.160329 x-originating-ip: [10.237.224.45] MIME-Version: 1.0 Subject: Re: [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: Thu, 28 Apr 2016 13:23:56 -0000 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-ID: <4F4E815322A45A49BC5E7C0E1C5C0365@intel.com> Content-Transfer-Encoding: quoted-printable On 26/04/2016 17:12, "toaster-bounces@yoctoproject.org on behalf of Elliot Smith" wrote: >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). Interesting: Bootstrap is responsive, so stuff should still be visible. Although our implementation of the responsive layout is not very clean, components (with the exception of tables in very narrow viewports) should wrap or stack vertically. Do you happen to know what's the viewport size of the PhantomJS default window? Figuring out what's going on might help with the work migrating to Bootstrap 3. Thanks! Bel=E9n > >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 =3D create_selenium_driver() >+ cls.driver.maximize_window() >=20 > @classmethod > def tearDownClass(cls): >--=20 >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. > >--=20 >_______________________________________________ >toaster mailing list >toaster@yoctoproject.org >https://lists.yoctoproject.org/listinfo/toaster