Merge lp:~nik90/ubuntu-clock-app/1-fix-trunk-tests into lp:ubuntu-clock-app

Proposed by Nekhelesh Ramananthan on 2015-01-21
Status: Merged
Approved by: Nicholas Skaggs on 2015-01-21
Approved revision: 187
Merged at revision: 186
Proposed branch: lp:~nik90/ubuntu-clock-app/1-fix-trunk-tests
Merge into: lp:ubuntu-clock-app
Diff against target: 43 lines (+5/-5)
2 files modified
debian/changelog (+1/-0)
tests/unit/tst_alarmRepeat.qml (+4/-5)
To merge this branch: bzr merge lp:~nik90/ubuntu-clock-app/1-fix-trunk-tests
Reviewer Review Type Date Requested Status
Nicholas Skaggs 2015-01-21 Approve on 2015-01-21
Alan Pope 🍺🐧🐱 πŸ¦„ 2015-01-21 Approve on 2015-01-21
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve on 2015-01-21
Review via email: mp+247078@code.launchpad.net

Commit Message

Fixed broken qml tests in trunk on vivid due to listitem behaviour changes.

Description of the Change

Fixed broken qml tests in trunk on vivid due to listitem behaviour changes.

Reasoning
---------

In RTM checkboxes in listitems can be enabled/disabled by clicking *anywhere* in the listitem. While in vivid, one has to explicitly press the checkbox to enable/disable it. This very small behaviour changes causes qml tests in trunk to fail on vivid.

To post a comment you must log in.

Looks good to me, thanks!

review: Approve
Nicholas Skaggs (nskaggs) wrote :

LGTM. I've noticed the same behavior with lists.

review: Approve
Nekhelesh Ramananthan (nik90) wrote :

Thnx for the review alan & nicholas.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2014-11-19 14:51:35 +0000
3+++ debian/changelog 2015-01-21 00:20:41 +0000
4@@ -29,6 +29,7 @@
5 * Added manual test to check disabling of alarms.
6 * Fixed alarm string not being translatable (LP: #1380248)
7 * Fixed the incorrect overriding of alarm delegate model value.
8+ * Fixed qml tests broken in vivid due to listitem behaviour change.
9
10 [Akiva Shammai Avraham]
11 * Improved the analog clock performance by updating the clock hands every second
12
13=== modified file 'tests/unit/tst_alarmRepeat.qml'
14--- tests/unit/tst_alarmRepeat.qml 2014-10-05 21:23:09 +0000
15+++ tests/unit/tst_alarmRepeat.qml 2015-01-21 00:20:41 +0000
16@@ -112,12 +112,12 @@
17
18 tryCompare(_alarm, "type", Alarm.OneTime, 3000, "Alarm type is not OneTime by default")
19
20- var dayListItem = findChild(alarmRepeatPageLoader.item, "alarmDay"+3)
21+ var randomDaySwitch = findChild(alarmRepeatPageLoader.item, "daySwitch"+3)
22
23- mouseClick(dayListItem, centerOf(dayListItem).x, centerOf(dayListItem).y)
24+ mouseClick(randomDaySwitch, centerOf(randomDaySwitch).x, centerOf(randomDaySwitch).y)
25 tryCompare(_alarm, "type", Alarm.Repeating, 3000, "Alarm type did not change to Repeating despite enabling a switch")
26
27- mouseClick(dayListItem, centerOf(dayListItem).x, centerOf(dayListItem).y)
28+ mouseClick(randomDaySwitch, centerOf(randomDaySwitch).x, centerOf(randomDaySwitch).y)
29 tryCompare(_alarm, "type", Alarm.OneTime, 3000, "Alarm type is not OneTime despite all switches disabled")
30 }
31
32@@ -129,11 +129,10 @@
33 waitForRendering(alarmRepeatPageLoader.item);
34
35 for(var i=0; i<repeater.count; i++) {
36- var dayListItem = findChild(alarmRepeatPageLoader.item, "alarmDayHolder"+i)
37 var currentDaySwitch = findChild(alarmRepeatPageLoader.item, "daySwitch"+i)
38
39 if(!currentDaySwitch.checked) {
40- mouseClick(dayListItem, centerOf(dayListItem).x, centerOf(dayListItem).y)
41+ mouseClick(currentDaySwitch, centerOf(currentDaySwitch).x, centerOf(currentDaySwitch).y)
42 }
43 }
44

Subscribers

People subscribed via source and target branches