Merge lp:~elopio/ubuntu-clock-app/check_alarm_creation into lp:ubuntu-clock-app/saucy

Proposed by Leo Arias
Status: Merged
Approved by: Leo Arias
Approved revision: 362
Merged at revision: 359
Proposed branch: lp:~elopio/ubuntu-clock-app/check_alarm_creation
Merge into: lp:ubuntu-clock-app/saucy
Diff against target: 76 lines (+16/-19)
2 files modified
tests/autopilot/ubuntu_clock_app/emulators.py (+15/-18)
tests/autopilot/ubuntu_clock_app/tests/__init__.py (+1/-1)
To merge this branch: bzr merge lp:~elopio/ubuntu-clock-app/check_alarm_creation
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Ubuntu Clock Developers Pending
Review via email: mp+208693@code.launchpad.net

Commit message

Added waits for the alarms to be created or deleted.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

Do you mind reverting,

203 - city_name = self.add_local_world_city()
204 + self.add_local_world_city()

Since I did this in my MP https://code.launchpad.net/~nik90/ubuntu-clock-app/reorganise-clock-tests/+merge/208686. This way I wouldn't have to deal with conflicts ;)

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

Full run, including nik90's branch: http://paste.ubuntu.com/7007541/

Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

12:04 AM <nik90> balloons: I propose one thing that we can do about the situation of the 3 failures.
12:05 AM <nik90> balloons: 2 of them are random. I am unable to reproduce them on my computer
12:05 AM <nik90> balloons: the 3rd one (test_recurring_alarms) is a proper failure due to a bug in the clock app
12:06 AM <nik90> balloons: so can elopio create a new MP with just the fixes to the delete alarm test for today
12:06 AM <nik90> balloons: I will handle the clock app bug in the weekend and then propose along with the improved alarms tests copied from elopio's branch
12:07 AM <nik90> balloons: otherwise we will continue to have the delete alarm test failure in the image until I get the clock app bug fix.

Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

the 3rd failure is concerning the addition of recurring alarms...it seems that the clock app is not saving the alarms on all the days causing the test to fail

Revision history for this message
Leo Arias (elopio) wrote :

I've split the branch in two, as nik suggested. The other part is in https://code.launchpad.net/~elopio/ubuntu-clock-app/improve_alarm_tests/+merge/208714

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
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Leo Arias (elopio) wrote :

This is a failure that happens some times on the clock tab, and nik fixed here: https://code.launchpad.net/~nik90/ubuntu-clock-app/reorganise-clock-tests/+merge/208686

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/autopilot/ubuntu_clock_app/emulators.py'
2--- tests/autopilot/ubuntu_clock_app/emulators.py 2014-02-27 20:45:11 +0000
3+++ tests/autopilot/ubuntu_clock_app/emulators.py 2014-02-28 01:27:05 +0000
4@@ -273,31 +273,23 @@
5
6 def get_num_of_alarms(self):
7 """Return the number of saved alarms."""
8- alarm_list = self.wait_select_single(
9- toolkit_emulators.QQuickListView,
10- objectName='listSavedAlarm')
11- #alarm_list.print_tree()
12- #sys.exit()
13- try:
14- print "Select single"
15- alarm_list.select_single('Base')
16- num_alarms = 1
17- except:
18- try:
19- print "Select many"
20- num_alarms = len(alarm_list.select_many('Base'))
21- except:
22- print "Select 0"
23- num_alarms = 0
24- print "num_alarms " + str(num_alarms)
25- return num_alarms
26+ return int(self._get_saved_alarms_list().count)
27+
28+ def _get_saved_alarms_list(self):
29+ return self.wait_select_single(
30+ toolkit_emulators.QQuickListView, objectName='listSavedAlarm')
31
32 @autopilot_logging.log_action(logger.info)
33 def add_alarm(self, name, alarm_type, day):
34+ old_alarm_count = self.get_num_of_alarms()
35 add_alarm_page = self._click_add_alarm_button()
36 add_alarm_page.fill_alarm_info(name, alarm_type, day)
37 self._click_save()
38 self._wait_to_stop_moving()
39+ try:
40+ self._get_saved_alarms_list().count.wait_for(old_alarm_count + 1)
41+ except AssertionError:
42+ raise ClockEmulatorException('Error creating alarm.')
43
44 def _click_add_alarm_button(self):
45 """Click the add alarm toolbar button."""
46@@ -313,12 +305,17 @@
47 @autopilot_logging.log_action(logger.info)
48 def delete_alarm(self, index):
49 """Delete an alarm at the specified index."""
50+ old_alarm_count = self.get_num_of_alarms()
51 alarm = self.wait_select_single(
52 toolkit_emulators.Base, objectName='alarm{}'.format(index))
53 if not self.main_view.wideAspect:
54 self.drag_page_up()
55 alarm.swipe_to_delete()
56 alarm.confirm_removal()
57+ try:
58+ self._get_saved_alarms_list().count.wait_for(old_alarm_count - 1)
59+ except AssertionError:
60+ raise ClockEmulatorException('Error deleting alarm.')
61
62 @autopilot_logging.log_action(logger.info)
63 def toggle_alarm(self, index):
64
65=== modified file 'tests/autopilot/ubuntu_clock_app/tests/__init__.py'
66--- tests/autopilot/ubuntu_clock_app/tests/__init__.py 2014-02-14 22:48:40 +0000
67+++ tests/autopilot/ubuntu_clock_app/tests/__init__.py 2014-02-28 01:27:05 +0000
68@@ -59,7 +59,7 @@
69 #turn off the OSK so it doesn't block screen elements
70 if model() != 'Desktop':
71 os.system("stop maliit-server")
72- self.addCleanup(os.system,"start maliit-server")
73+ self.addCleanup(os.system, "start maliit-server")
74
75 if os.path.exists(self.local_location):
76 self.launch_test_local()

Subscribers

People subscribed via source and target branches