* [PATCH] toaster-tests: maximize browser window when running UI tests
@ 2016-04-26 16:12 Elliot Smith
2016-04-28 13:23 ` Barros Pena, Belen
0 siblings, 1 reply; 5+ messages in thread
From: Elliot Smith @ 2016-04-26 16:12 UTC (permalink / raw)
To: toaster
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>
---
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.
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] toaster-tests: maximize browser window when running UI tests
2016-04-26 16:12 [PATCH] toaster-tests: maximize browser window when running UI tests Elliot Smith
@ 2016-04-28 13:23 ` Barros Pena, Belen
2016-04-28 13:31 ` Smith, Elliot
0 siblings, 1 reply; 5+ messages in thread
From: Barros Pena, Belen @ 2016-04-28 13:23 UTC (permalink / raw)
To: Smith, Elliot, toaster@yoctoproject.org
On 26/04/2016 17:12, "toaster-bounces@yoctoproject.org on behalf of Elliot
Smith" <toaster-bounces@yoctoproject.org on behalf of
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.
Thanks!
Belén
>
>Ensure that the window is maximized before running tests to
>prevent this happening.
>
>Signed-off-by: Elliot Smith <elliot.smith@intel.com>
>---
> 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.
>
>--
>_______________________________________________
>toaster mailing list
>toaster@yoctoproject.org
>https://lists.yoctoproject.org/listinfo/toaster
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] toaster-tests: maximize browser window when running UI tests
2016-04-28 13:23 ` Barros Pena, Belen
@ 2016-04-28 13:31 ` Smith, Elliot
2016-04-28 13:57 ` Barros Pena, Belen
0 siblings, 1 reply; 5+ messages in thread
From: Smith, Elliot @ 2016-04-28 13:31 UTC (permalink / raw)
To: Barros Pena, Belen; +Cc: toaster@yoctoproject.org
[-- Attachment #1.1: Type: text/plain, Size: 2915 bytes --]
On 28 April 2016 at 14:23, Barros Pena, Belen <belen.barros.pena@intel.com>
wrote:
> On 26/04/2016 17:12, "toaster-bounces@yoctoproject.org on behalf of Elliot
> Smith" <toaster-bounces@yoctoproject.org on behalf of
> 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.
Elliot
>
> Thanks!
>
> Belén
>
> >
> >Ensure that the window is maximized before running tests to
> >prevent this happening.
> >
> >Signed-off-by: Elliot Smith <elliot.smith@intel.com>
> >---
> > 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.
> >
> >--
> >_______________________________________________
> >toaster mailing list
> >toaster@yoctoproject.org
> >https://lists.yoctoproject.org/listinfo/toaster
>
>
--
Elliot Smith
Software Engineer
Intel Open Source Technology Centre
[-- Attachment #1.2: Type: text/html, Size: 4352 bytes --]
[-- Attachment #2: screenshot.png --]
[-- Type: image/png, Size: 38147 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] toaster-tests: maximize browser window when running UI tests
2016-04-28 13:31 ` Smith, Elliot
@ 2016-04-28 13:57 ` Barros Pena, Belen
2016-06-09 13:19 ` Michael Wood
0 siblings, 1 reply; 5+ messages in thread
From: Barros Pena, Belen @ 2016-04-28 13:57 UTC (permalink / raw)
To: Smith, Elliot; +Cc: toaster@yoctoproject.org
On 28/04/2016 14:31, "Smith, Elliot" <elliot.smith@intel.com> wrote:
>On 28 April 2016 at 14:23, Barros Pena, Belen
><belen.barros.pena@intel.com> wrote:
>
>On 26/04/2016 17:12, "toaster-bounces@yoctoproject.org on behalf of Elliot
>Smith" <toaster-bounces@yoctoproject.org on behalf of
>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én
>
>
>Elliot
>
>
>
>
>Thanks!
>
>Belén
>
>>
>>Ensure that the window is maximized before running tests to
>>prevent this happening.
>>
>>Signed-off-by: Elliot Smith <elliot.smith@intel.com>
>>---
>> 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.
>>
>
>
>>--
>>_______________________________________________
>>toaster mailing list
>>toaster@yoctoproject.org
>>https://lists.yoctoproject.org/listinfo/toaster
>
>
>
>
>
>
>
>
>--
>Elliot Smith
>Software Engineer
>Intel Open Source Technology Centre
>
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] toaster-tests: maximize browser window when running UI tests
2016-04-28 13:57 ` Barros Pena, Belen
@ 2016-06-09 13:19 ` Michael Wood
0 siblings, 0 replies; 5+ messages in thread
From: Michael Wood @ 2016-06-09 13:19 UTC (permalink / raw)
To: toaster
Thanks - Added to toaster-next
Michael
On 28/04/16 14:57, Barros Pena, Belen wrote:
>
> On 28/04/2016 14:31, "Smith, Elliot" <elliot.smith@intel.com> wrote:
>
>> On 28 April 2016 at 14:23, Barros Pena, Belen
>> <belen.barros.pena@intel.com> wrote:
>>
>> On 26/04/2016 17:12, "toaster-bounces@yoctoproject.org on behalf of Elliot
>> Smith" <toaster-bounces@yoctoproject.org on behalf of
>> 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én
>
>>
>> Elliot
>>
>>
>>
>>
>> Thanks!
>>
>> Belén
>>
>>> Ensure that the window is maximized before running tests to
>>> prevent this happening.
>>>
>>> Signed-off-by: Elliot Smith <elliot.smith@intel.com>
>>> ---
>>> 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.
>>>
>>
>>> --
>>> _______________________________________________
>>> toaster mailing list
>>> toaster@yoctoproject.org
>>> https://lists.yoctoproject.org/listinfo/toaster
>>
>>
>>
>>
>>
>>
>>
>> --
>> Elliot Smith
>> Software Engineer
>> Intel Open Source Technology Centre
>>
>>
>>
>>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-06-09 13:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-26 16:12 [PATCH] toaster-tests: maximize browser window when running UI tests Elliot Smith
2016-04-28 13:23 ` Barros Pena, Belen
2016-04-28 13:31 ` Smith, Elliot
2016-04-28 13:57 ` Barros Pena, Belen
2016-06-09 13:19 ` Michael Wood
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.