Merge lp:~chris.gagnon/ubuntu-calendar-app/fix_1293489 into lp:ubuntu-calendar-app

Proposed by Chris Gagnon
Status: Rejected
Rejected by: Nicholas Skaggs
Proposed branch: lp:~chris.gagnon/ubuntu-calendar-app/fix_1293489
Merge into: lp:ubuntu-calendar-app
Diff against target: 9 lines (+1/-1)
1 file modified
tests/autopilot/calendar_app/tests/__init__.py (+1/-1)
To merge this branch: bzr merge lp:~chris.gagnon/ubuntu-calendar-app/fix_1293489
Reviewer Review Type Date Requested Status
Nicholas Skaggs (community) Disapprove
Victor Thompson (community) Needs Fixing
Ubuntu Phone Apps Jenkins Bot continuous-integration Needs Fixing
Review via email: mp+211777@code.launchpad.net

Commit message

use wait_select_single for the main_view instead of select_single in the autopilot tests

Description of the change

use wait_select_single for the main_view instead of select_single

To post a comment you must log in.
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

We found this to be useful for clock as well; does this actually solve everything?

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Victor Thompson (vthompson) wrote :

This does allow the tests to run, but test_new_event still fails. I ran it twice with the same result:

Starting test calendar_app.tests.test_calendar.TestMainView.test_new_event (with touch)
...
Traceback (most recent call last):
File "/home/phablet/autopilot/calendar_app/tests/test_calendar.py", line 89, in test_new_event
self.assertThat(people_field.activeFocus, Eventually(Equals(True)))
File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 406, in assertThat
raise mismatch_error
MismatchError: After 10.0 seconds test on NewEventEntryField.activeFocus failed: True != dbus.Boolean(False, variant_level=1)

Ran 1 test in 142.140s
FAILED (failures=1)

review: Needs Fixing
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

Yes, the issue with new event is twofold. First, the field is offscreen. Second, once saved, the assertion to check for a new event fails randomly when the event overlaps the screen. I'm unsure if this always happens or if it's only at a certain time. On a flo, neither of these issues exist due to the larger screen.

Revision history for this message
Victor Thompson (vthompson) wrote :

Actually, even the wait_select_single doesn't seem to solve the issue 100% of the time.

Revision history for this message
Victor Thompson (vthompson) wrote :

I have a MR with a change [1] that fixes the field being offscreen:

+ # scroll to make bottom fields visible
+ self.pointing_device.move_to_object(location_field)
+ x1 = self.main_view.height/2
+ y1 = self.main_view.width/2
+ self.pointing_device.drag(x1, y1, x1, y1 - y1/2)
+

[1] https://code.launchpad.net/~vthompson/ubuntu-calendar-app/scroll-in-test/+merge/211856

Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

As this changes is now in trunk, it's no longer needed.

review: Disapprove

Unmerged revisions

213. By Chris Gagnon

wait for the main_view

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/autopilot/calendar_app/tests/__init__.py'
2--- tests/autopilot/calendar_app/tests/__init__.py 2014-01-31 21:15:52 +0000
3+++ tests/autopilot/calendar_app/tests/__init__.py 2014-03-19 16:52:55 +0000
4@@ -122,4 +122,4 @@
5
6 @property
7 def main_view(self):
8- return self.app.select_single(emulators.MainView)
9+ return self.app.wait_select_single(emulators.MainView)

Subscribers

People subscribed via source and target branches

to status/vote changes: