on xenial help sign in
Improve test_set_current_scope_reset reliability.
commit94e20b8c236559d98daf15e0dc1a2d8fb485d4c4 authorMichał Sawicz <michal.sawicz@canonical.com> dateMon 21 Jul 2014, 14:09 (12 years ago) parent34c798f
1 file changed+9−4
tests/qmltests/Dash/tst_DashContent.qml+9−4
tests/qmltests/Dash/tst_DashContent.qml+9−4
@@ -61,6 +61,11 @@ Item {
6161 signalName: "movementStarted"
6262 }
6363
64+ SignalSpy {
65+ id: loadedSpy
66+ signalName: "loaded"
67+ }
68+
6469 UT.UnityTestCase {
6570 name: "DashContent"
6671 when: scopesModel.loaded && windowShown
@@ -78,6 +83,7 @@ Item {
7883
7984 function cleanup() {
8085 movementStartedSpy.clear();
86+ loadedSpy.clear();
8187 dashContent.visible = true;
8288
8389 var dashContentList = findChild(dashContent, "dashContentList");
@@ -134,13 +140,12 @@ Item {
134140
135141 function test_set_current_scope_reset() {
136142 var dashContentList = findChild(dashContent, "dashContentList");
137− verify(dashContentList != undefined);
143+ verify(dashContentList, "Couldn't find dashContentList");
138144 var scope = findChild(dashContent, "MockScope1 loader");
139− waitForRendering(scope);
140145
141− var categoryListView = findChild(dashContentList, "categoryListView");
142− waitForRendering(categoryListView);
146+ tryCompare(scope, "status", Loader.Ready);
143147
148+ var categoryListView = findChild(dashContentList, "categoryListView");
144149 categoryListView.contentY = units.gu(10);
145150
146151 compare(dashContentList.currentItem.item.objectName, "MockScope1")