Failure in test_gallery_view.py because the device is in landscape mode

RESOLVED INVALID

Status

Firefox OS
Gaia::UI Tests
RESOLVED INVALID
2 years ago
2 years ago

People

(Reporter: Martijn Wargers (dead), Assigned: Martijn Wargers (dead))

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
I saw this failure in the Mountain View lab where one of the devices is apparantly in landscape mode.

http://jenkins1.qa.scl3.mozilla.com/view/Mozilla%20Lab/job/aries.mozilla-central.nightly.ui.functional.smoke/199/HTML_Report/
Traceback (most recent call last):
File "/var/jenkins/1/workspace/aries.mozilla-central.nightly.ui.functional.smoke/.env/local/lib/python2.7/site-packages/marionette_client-0.17-py2.7.egg/marionette/marionette_test.py", line 296, in run
testMethod()
File "/var/jenkins/1/workspace/aries.mozilla-central.nightly.ui.functional.smoke/tests/python/gaia-ui-tests/gaiatest/tests/functional/gallery/test_gallery_view.py", line 46, in test_gallery_view
self.assertEqual(self.device.screen_width, image.photo_toolbar_width)
AssertionError: 640 != 590

This is similar as bug 1205763, we should make this test also robust against this.

I'm currently running all the gallery tests in landscape orientation to make sure there are no other potential failures lurking out there.
(Assignee)

Comment 1

2 years ago
Hrm, this test actually expects the device to be in portrait orientation.
When removing the obvious line 36 and 37 that causes failures, I get a failure in line 40:
self.device.change_orientation('landscape-primary')
print(self.device.screen_orientation) returns: portrait-primary

I don't really understand why this doesn't work. The change_orientation code is here:
http://mxr.mozilla.org/gaia/source/tests/python/gaia-ui-tests/gaiatest/gaia_test.py#809

Comment 2

2 years ago
Created attachment 8666172 [details] [review]
[gaia] mwargers:1208471 > mozilla-b2g:master
(Assignee)

Comment 3

2 years ago
Comment on attachment 8666172 [details] [review]
[gaia] mwargers:1208471 > mozilla-b2g:master

Ok, fixing mozUnlockOrientation() fixes the issue in comment 1.
For the rest, I'm not sure what to do with the original failure. Those checks makes this test expect the device to be in the portrait position.
Attachment #8666172 - Flags: review?(npark)
Attachment #8666172 - Flags: review?(jlorenzo)

Updated

2 years ago
Attachment #8666172 - Flags: review?(npark) → review+
Comment on attachment 8666172 [details] [review]
[gaia] mwargers:1208471 > mozilla-b2g:master

I understand why we put () at these lines, but I have a hard time to get why we perform this execute_script call in the middle of the test.

The fix looks good to me, but I'd look into a way to make this test clearer.
Attachment #8666172 - Flags: review?(jlorenzo) → review+
(Assignee)

Comment 5

2 years ago
Because the screen is locked otherwise even when you run a new gaia UI test.

Merged this pull request: https://github.com/mozilla-b2g/gaia/commit/85df11003adccc1168bca6dec446ce67c0545340
(Assignee)

Comment 6

2 years ago
Johan, this test actually expects the device to be in portrait mode, so when the device is in landscape, then this test will fail.
We could just remove that check or we should WONTFIX this bug. What do you think?
Flags: needinfo?(jlorenzo)
To me, this test would be a great integration test, but not an end-to-end one. Let's keep the test as is for now, until we put more effort on the integration suite.
Flags: needinfo?(jlorenzo)
(Assignee)

Comment 8

2 years ago
Ok, I'll resolve this bug as INVALID then.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.