~mterry/+junk/u8.2

« back to all changes in this revision

Viewing changes to tests/qmltests/Panel/Indicators/tst_DefaultIndicatorWidget.qml

  • Committer: Michael Terry
  • Date: 2014-11-17 14:56:04 UTC
  • mfrom: (1317.1.118 unity8)
  • Revision ID: michael.terry@canonical.com-20141117145604-96dn9p5nwkifq2f4
MergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright 2013 Canonical Ltd.
3
 
 *
4
 
 * This program is free software; you can redistribute it and/or modify
5
 
 * it under the terms of the GNU General Public License as published by
6
 
 * the Free Software Foundation; version 3.
7
 
 *
8
 
 * This program is distributed in the hope that it will be useful,
9
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
 
 * GNU General Public License for more details.
12
 
 *
13
 
 * You should have received a copy of the GNU General Public License
14
 
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
15
 
 */
16
 
 
17
 
import QtQuick 2.0
18
 
import QtTest 1.0
19
 
import Unity.Test 0.1 as UT
20
 
import QMenuModel 0.1
21
 
import "../../../../qml/Panel/Indicators"
22
 
 
23
 
Item {
24
 
    id: testView
25
 
    width: units.gu(40)
26
 
    height: units.gu(70)
27
 
 
28
 
   DefaultIndicatorWidget {
29
 
        id: widget
30
 
 
31
 
        anchors {
32
 
            left: parent.left
33
 
            top: parent.top
34
 
        }
35
 
 
36
 
        menuModel: UnityMenuModel {}
37
 
        busName: "test"
38
 
        actionsObjectPath: "test"
39
 
        deviceMenuObjectPath: "test"
40
 
 
41
 
        rootMenuType: ""
42
 
 
43
 
        iconSize: units.gu(3.2)
44
 
        height: units.gu(3)
45
 
    }
46
 
 
47
 
    UT.UnityTestCase {
48
 
        name: "DefaultIndicatorWidget"
49
 
        when: windowShown
50
 
 
51
 
        function init() {
52
 
            widget.rootActionState.icons = [];
53
 
            widget.rootActionState.leftLabel = "";
54
 
            widget.rootActionState.rightLabel = "";
55
 
            waitForRendering(widget)
56
 
        }
57
 
 
58
 
        // FIXME: add tests
59
 
    }
60
 
}