Merge lp:~zsombi/ubuntu-ui-toolkit/picker-bindingloop-54 into lp:ubuntu-ui-toolkit/staging

Proposed by Zsombor Egri
Status: Merged
Approved by: Zsombor Egri
Approved revision: 1412
Merged at revision: 1410
Proposed branch: lp:~zsombi/ubuntu-ui-toolkit/picker-bindingloop-54
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 113 lines (+31/-29)
2 files modified
tests/unit/runtest.sh (+3/-0)
tests/unit_x11/tst_components/tst_listitem.qml (+28/-29)
To merge this branch: bzr merge lp:~zsombi/ubuntu-ui-toolkit/picker-bindingloop-54
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Cris Dywan Approve
Review via email: mp+249991@code.launchpad.net

Commit message

Moving the tst_focus.qml under exceptions till we fix DatePicker binding loops.

To post a comment you must log in.
Revision history for this message
Cris Dywan (kalikiana) wrote :

As per discussion, makes sense to me, and we still get results with this.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/unit/runtest.sh'
2--- tests/unit/runtest.sh 2015-02-10 16:47:59 +0000
3+++ tests/unit/runtest.sh 2015-02-18 15:39:50 +0000
4@@ -75,6 +75,9 @@
5 tst_page.qml \
6 tst_toolbar.qml \
7 tst_tabs.qml \
8+ tst_focus.qml \
9+ tst_pickerpanel.qml \
10+ tst_picker.qml \
11 '
12 if [ $WARNINGS -ne 0 ]; then
13 if [[ $EXCEPTIONS == *$_TARGET_$_TESTFILE* ]]; then
14
15=== modified file 'tests/unit_x11/tst_components/tst_listitem.qml'
16--- tests/unit_x11/tst_components/tst_listitem.qml 2015-02-10 13:44:25 +0000
17+++ tests/unit_x11/tst_components/tst_listitem.qml 2015-02-18 15:39:50 +0000
18@@ -303,40 +303,38 @@
19 movingSpy.wait();
20 }
21
22- function test_mouse_click_on_listitem() {
23+ function test_vertical_listview_move_cancels_highlight_mouse() {
24 var listItem = findChild(listView, "listItem0");
25 verify(listItem, "Cannot find listItem0");
26
27- mousePress(listItem, listItem.width / 2, 0);
28- compare(listItem.highlighted, true, "Item is not highlighted?");
29- // do 5 moves to be able to sense it
30- var dy = 0;
31- for (var i = 1; i <= 5; i++) {
32- dy += i * 10;
33- mouseMove(listItem, listItem.width / 2, dy);
34- }
35- compare(listItem.highlighted, false, "Item is highlighted still!");
36- // cleanup, simulate drop event
37- mouseRelease(listItem, listItem.width / 2, dy);
38- mouseRelease(listItem, listItem.width / 2, dy);
39+ // convert positions and use the listView to move
40+ var pos = listView.mapFromItem(listItem, listItem.width / 2, 0);
41+ highlightedSpy.target = listItem;
42+ flick(listView, pos.x, pos.y, 0, units.gu(10), -1, undefined, undefined, undefined, 100);
43+ highlightedSpy.wait();
44+ // the highglighted should have been changed twice
45+ compare(highlightedSpy.count, 2, "highlighted did not change twice");
46+ compare(listItem.highlighted, false, "Itemshoudl not be highlighted");
47 }
48- function test_touch_click_on_listitem() {
49+ function test_vertical_listview_move_cancels_highlight_touch() {
50 var listItem = findChild(listView, "listItem0");
51 verify(listItem, "Cannot find listItem0");
52
53- TestExtras.touchPress(0, listItem, Qt.point(listItem.width / 2, 5));
54- compare(listItem.highlighted, true, "Item is not highlighted?");
55- // do 5 moves to be able to sense it
56- var dy = 0;
57+ // convert positions and use the listView to move
58+ var pos = listView.mapFromItem(listItem, listItem.width / 2, 0);
59+ highlightedSpy.target = listItem;
60+ TestExtras.touchPress(0, listView, pos);
61 for (var i = 1; i <= 5; i++) {
62- dy += i * 10;
63- TestExtras.touchMove(0, listItem, Qt.point(listItem.width / 2, dy));
64+ pos.y += i * units.gu(2);
65+ TestExtras.touchMove(0, listView, pos);
66+ // wait few milliseconds between moves
67+ wait(100);
68 }
69- compare(listItem.highlighted, false, "Item is highlighted still!");
70- // cleanup, wait few milliseconds to avoid dbl-click collision
71- TestExtras.touchRelease(0, listItem, Qt.point(listItem.width / 2, dy));
72- TestExtras.touchRelease(0, listItem, Qt.point(listItem.width / 2, dy));
73- wait(400);
74+ TestExtras.touchRelease(0, listView, pos);
75+ highlightedSpy.wait();
76+ // the highglighted should have been changed twice
77+ compare(highlightedSpy.count, 2, "highlighted did not change twice");
78+ compare(listItem.highlighted, false, "Itemshoudl not be highlighted");
79 }
80
81 function test_background_height_change_on_divider_visible() {
82@@ -591,10 +589,11 @@
83 }
84 }
85
86- function test_overshoot_from_style() {
87+ // execute thes overshoot tests early enough to make sure that style is not loaded yet
88+ function test_1_overshoot_from_style() {
89 // scroll to the last ListView element and test on that, to make sure we don't have the style loaded for that component
90 listView.positionViewAtEnd();
91- var listItem = findChild(listView, "listItem" + (listView.count - 1));
92+ var listItem = findChild(listView, "listItem" + (listView.count - 4));
93 verify(listItem, "Cannot get list item for testing");
94
95 compare(listItem.swipeOvershoot, 0.0, "No overshoot should be set yet!");
96@@ -608,7 +607,7 @@
97 rebound(listItem);
98 }
99
100- function test_custom_overshoot_data() {
101+ function test_2_custom_overshoot_data() {
102 // use different items to make sure the style doesn't update the overshoot values during the test
103 return [
104 {tag: "Positive value", index: listView.count - 1, value: units.gu(10), expected: units.gu(10)},
105@@ -617,7 +616,7 @@
106 {tag: "Negative value", index: listView.count - 3, value: -1, expected: units.gu(2)},
107 ];
108 }
109- function test_custom_overshoot(data) {
110+ function test_2_custom_overshoot(data) {
111 // scroll to the last ListView element and test on that, to make sure we don't have the style loaded for that component
112 listView.positionViewAtEnd();
113 var listItem = findChild(listView, "listItem" + data.index);

Subscribers

People subscribed via source and target branches