on xenial help sign in
fixlets
commite02edb88a524ae06a9ad76b0fdcf13a7eab53682 authorAlbert Astals <albert.astals@canonical.com> dateWed 12 Feb 2014, 17:18 (13 years ago) parent4cfe7e3
2 files changed+7−4
qml/Dash/Previews/PreviewProgress.qml+2−1 tests/qmltests/Dash/Previews/tst_PreviewProgress.qml+5−3
qml/Dash/Previews/PreviewProgress.qml+2−1
@@ -18,7 +18,8 @@ import QtQuick 2.1
1818import Ubuntu.Components 0.1
1919import Ubuntu.DownloadDaemonListener 0.1
2020
21−/*! This preview widget shows a progress bar.
21+/*! \brief Preview widget for a progress bar.
22+ *
2223 * It feeds itself from the source determined in widgetData["source"]
2324 * At the moment we only support the dbus source defined
2425 * by source["dbus-name"] and source["dbus-object"]
tests/qmltests/Dash/Previews/tst_PreviewProgress.qml+5−3
@@ -63,7 +63,7 @@ Rectangle {
6363 when: windowShown
6464
6565 function test_json() {
66− spy.target = previewProgress
66+ spy.target = previewProgress;
6767
6868 // The mock DownloadTracker triggers its signals when you pass
6969 // finish/error as dbus-object to it. Exercise it here
@@ -74,9 +74,11 @@ Rectangle {
7474 compare(args[1], "finished");
7575 compare(args[2], progressjsonFinish);
7676
77+ spy.clear();
78+
7779 previewProgress.widgetData = progressjsonError;
78− compare(spy.count, 2);
79− var args = spy.signalArguments[1];
80+ compare(spy.count, 1);
81+ var args = spy.signalArguments[0];
8082 compare(args[0], "previewProgress");
8183 compare(args[1], "failed");
8284 compare(args[2], progressjsonError);