Merge lp:~saviq/unity/phablet.fix-listview-tests into lp:unity/phablet

Proposed by Michał Sawicz
Status: Merged
Approved by: Michał Sawicz
Approved revision: no longer in the source branch.
Merged at revision: 684
Proposed branch: lp:~saviq/unity/phablet.fix-listview-tests
Merge into: lp:unity/phablet
Diff against target: 73 lines (+15/-9)
3 files modified
tests/qmltests/Dash/tst_FilterGrids.qml (+4/-3)
tests/qmltests/Notifications/tst_Notifications.qml (+5/-2)
tests/qmltests/Panel/tst_Overview.qml (+6/-4)
To merge this branch: bzr merge lp:~saviq/unity/phablet.fix-listview-tests
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Daniel d'Andrada (community) Approve
Review via email: mp+165051@code.launchpad.net

Commit message

fix ListView-related tests for ListView fixes in Qt

To post a comment you must log in.
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

Looks ok.

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) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
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) :
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/qmltests/Dash/tst_FilterGrids.qml'
2--- tests/qmltests/Dash/tst_FilterGrids.qml 2013-05-08 09:51:55 +0000
3+++ tests/qmltests/Dash/tst_FilterGrids.qml 2013-05-22 12:23:29 +0000
4@@ -121,16 +121,17 @@
5 // Wait until the FilterGrid is loaded by the loader
6 tryCompare(gridLoader, "status", Loader.Ready, "Loader couldn't load " + data.component);
7
8- // Wait until the GridView inside the model has the according amout of items set
9+ // Wait until the GridView inside the model has finished rendering
10 var gridView = findChild(gridLoader, "responsiveGridViewGrid");
11- var itemCount = gridLoader.item.filter ? gridLoader.item.collapsedRowCount * gridLoader.item.columns : fakeModel.count;
12- tryCompare(gridView, "count", itemCount)
13+ gridView.forceLayout();
14+ waitForRendering(gridView);
15
16 // Wait until the expandinganimation is finished
17 tryCompare(gridLoader.item.__expansionAnimation, "running", false)
18
19 // Click item 1
20 var tile1 = findChild(gridLoader.item, "delegate1");
21+ verify(tile1 !== undefined, "delegate1 wasn't found");
22 clickedSpy.clear()
23 mouseClick(tile1, tile1.width/2, tile1.height/2);
24
25
26=== modified file 'tests/qmltests/Notifications/tst_Notifications.qml'
27--- tests/qmltests/Notifications/tst_Notifications.qml 2013-05-14 15:13:05 +0000
28+++ tests/qmltests/Notifications/tst_Notifications.qml 2013-05-22 12:23:29 +0000
29@@ -284,10 +284,13 @@
30 // populate model with some mock notifications
31 mockModel.append(data)
32
33- // make sure the model is properly updated before going on
34- tryCompare(notifications, "count", mockModel.count)
35+ // make sure the view is properly updated before going on
36+ notifications.forceLayout();
37+ waitForRendering(notifications);
38
39 var notification = findChild(notifications, "notification" + (mockModel.count - 1))
40+ verify(notification !== undefined, "notification wasn't found");
41+
42 var icon = findChild(notification, "icon")
43 var interactiveArea = findChild(notification, "interactiveArea")
44 var secondaryIcon = findChild(notification, "secondaryIcon")
45
46=== modified file 'tests/qmltests/Panel/tst_Overview.qml'
47--- tests/qmltests/Panel/tst_Overview.qml 2013-04-17 13:01:10 +0000
48+++ tests/qmltests/Panel/tst_Overview.qml 2013-05-22 12:23:29 +0000
49@@ -90,18 +90,20 @@
50 mockModel2.append(mockModel.get(i));
51 }
52 overview.indicatorsModel = mockModel2;
53- tryCompare(overviewGrid, "count", 3)
54+ overviewGrid.forceLayout();
55+ waitForRendering(overviewGrid);
56
57 var button = findChild(overview, "overviewGridButton2");
58- verify(button != undefined);
59+ verify(button !== undefined, "button2 wasn't found");
60 button = findChild(overview, "overviewGridButton3");
61 compare(button, undefined, "There should only be 3 buttons... found at least 4...");
62
63 mockModel2.append({title: "humppa", label: "", iconSource: "graphics/sound_on_icon.png"})
64- tryCompare(overviewGrid, "count", 4)
65+ overviewGrid.forceLayout();
66+ waitForRendering(overviewGrid);
67
68 button = findChild(overview, "overviewGridButton3");
69- verify(button != undefined);
70+ verify(button !== undefined, "button3 wasn't found");
71 }
72
73 function test_text_or_icon_data() {

Subscribers

People subscribed via source and target branches