Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id B7CF8E00DCE; Thu, 28 Apr 2016 06:57:38 -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.65 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 47D05E00DCA for ; Thu, 28 Apr 2016 06:57:36 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP; 28 Apr 2016 06:57:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,546,1455004800"; d="scan'208";a="693750271" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by FMSMGA003.fm.intel.com with ESMTP; 28 Apr 2016 06:57:36 -0700 Received: from irsmsx110.ger.corp.intel.com ([169.254.15.10]) by IRSMSX104.ger.corp.intel.com ([169.254.5.87]) with mapi id 14.03.0248.002; Thu, 28 Apr 2016 14:57:04 +0100 From: "Barros Pena, Belen" To: "Smith, Elliot" Thread-Topic: [Toaster] [PATCH] toaster-tests: maximize browser window when running UI tests Thread-Index: AQHRoVErdlChaVjamUWTV9FffBt235+fUQEAgAAYCgA= Date: Thu, 28 Apr 2016 13:57:04 +0000 Message-ID: References: <1461687172-31204-1-git-send-email-elliot.smith@intel.com> In-Reply-To: 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 Cc: "toaster@yoctoproject.org" 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:57:38 -0000 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-ID: Content-Transfer-Encoding: quoted-printable On 28/04/2016 14:31, "Smith, Elliot" wrote: >On 28 April 2016 at 14:23, Barros Pena, Belen > wrote: > >On 26/04/2016 17:12, "toaster-bounces@yoctoproject.org on behalf of Elliot >Smith" elliot.smith@intel.com> 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. > > > > >About 194px. I've attached a screenshot. Excellent: so tables and modals are causing the trouble. This is good to know. Thanks! Bel=E9n > > >Elliot > >=20 > > >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() >> >> @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. >> > > >>-- >>_______________________________________________ >>toaster mailing list >>toaster@yoctoproject.org >>https://lists.yoctoproject.org/listinfo/toaster > > > > > > > > >--=20 >Elliot Smith >Software Engineer >Intel Open Source Technology Centre > > > >