on xenial help sign in
fixlets
e02edb8Albert Astals
qml/Dash/Previews/PreviewProgress.qml+2−1
@@ -18,7 +18,8 @@ import QtQuick 2.1
18import Ubuntu.Components 0.1
18import Ubuntu.Components 0.1
19import Ubuntu.DownloadDaemonListener 0.1
19import Ubuntu.DownloadDaemonListener 0.1
20
20
21−/*! This preview widget shows a progress bar.
21+/*! \brief Preview widget for a progress bar.
22+ *
22 * It feeds itself from the source determined in widgetData["source"]
23 * It feeds itself from the source determined in widgetData["source"]
23 * At the moment we only support the dbus source defined
24 * At the moment we only support the dbus source defined
24 * by source["dbus-name"] and source["dbus-object"]
25 * by source["dbus-name"] and source["dbus-object"]
tests/qmltests/Dash/Previews/tst_PreviewProgress.qml+5−3
@@ -63,7 +63,7 @@ Rectangle {
63 when: windowShown
63 when: windowShown
64
64
65 function test_json() {
65 function test_json() {
66− spy.target = previewProgress
66+ spy.target = previewProgress;
67
67
68 // The mock DownloadTracker triggers its signals when you pass
68 // The mock DownloadTracker triggers its signals when you pass
69 // finish/error as dbus-object to it. Exercise it here
69 // finish/error as dbus-object to it. Exercise it here
@@ -74,9 +74,11 @@ Rectangle {
74 compare(args[1], "finished");
74 compare(args[1], "finished");
75 compare(args[2], progressjsonFinish);
75 compare(args[2], progressjsonFinish);
76
76
77+ spy.clear();
78+
77 previewProgress.widgetData = progressjsonError;
79 previewProgress.widgetData = progressjsonError;
78− compare(spy.count, 2);
80+ compare(spy.count, 1);
79− var args = spy.signalArguments[1];
81+ var args = spy.signalArguments[0];
80 compare(args[0], "previewProgress");
82 compare(args[0], "previewProgress");
81 compare(args[1], "failed");
83 compare(args[1], "failed");
82 compare(args[2], progressjsonError);
84 compare(args[2], progressjsonError);