~mzanetti/unity8/fix-1648251

« back to all changes in this revision

Viewing changes to tests/qmltests/Dash/Previews/tst_PreviewProgress.qml

  • Committer: Michael Zanetti
  • Date: 2016-10-13 11:02:11 UTC
  • mfrom: (2525.1.132 unity8)
  • Revision ID: michael.zanetti@canonical.com-20161013110211-tj2gly2dxaqj5t2e
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright 2014 Canonical Ltd.
 
2
 * Copyright 2014-2016 Canonical Ltd.
3
3
 *
4
4
 * This program is free software; you can redistribute it and/or modify
5
5
 * it under the terms of the GNU General Public License as published by
40
40
        "source": { "dbus-name" : "somename", "dbus-object": "error" }
41
41
    }
42
42
 
 
43
    property var progressjsonProcessing: {
 
44
        "type": "progress",
 
45
        "source": { "dbus-name" : "somename", "dbus-object": "processing" }
 
46
    }
 
47
 
43
48
    SignalSpy {
44
49
        id: spy
45
50
        signalName: "triggered"
82
87
            compare(args[0], "previewProgress");
83
88
            compare(args[1], "failed");
84
89
            compare(args[2], progressjsonError);
 
90
 
 
91
            spy.clear();
 
92
 
 
93
            var progressBar = findChild(previewProgress, "progressBar");
 
94
            compare(progressBar.indeterminate, false);
 
95
            previewProgress.widgetData = progressjsonProcessing;
 
96
            progressBar = findChild(previewProgress, "progressBar");
 
97
            tryCompare(progressBar, "indeterminate", true);
85
98
        }
86
99
    }
87
100
}