Initial source commit
[apps/homescreen.git] / test / commandlinetests.txt
1 Command line tests
2
3 Precondition for all test is, that the D-Bus session is launched:
4 $export `dbus-launch`
5
6 ---------------------------------------------------------------------------------------------------------------------
7 Interface:
8 org.agl.daynightmode
9
10 Signal:
11     <signal name="dayNightMode">
12       <arg name="mode" type="i" direction="out"/>
13     </signal>
14
15 Preconditions:
16 - HomeScreen app is running
17
18 Test:
19 no command line test available right now
20
21 ---------------------------------------------------------------------------------------------------------------------
22 Interface:
23 org.agl.homescreen
24
25 Method:
26     <method name="hardKeyPressed">
27       <arg name="key" type="i" direction="in"/> <!-- using the inputevent.hpp InputEvent::HardKey type -->
28     </method>
29
30 Preconditions:
31 - HomeScreen app is running
32
33 Test:
34 $dbus-send --session --type=method_call --print-reply --dest=org.agl.homescreen /HomeScreen org.agl.homescreen.hardKeyPressed int32:0
35
36 Method:
37     <method name="setToFullscreen">
38       <arg name="pid" type="i" direction="in"/>
39     </method>
40
41 $dbus-send --session --type=method_call --print-reply --dest=org.agl.homescreen /HomeScreen org.agl.homescreen.setToFullscreen int32:0
42
43 ---------------------------------------------------------------------------------------------------------------------
44 Interface:
45 org.agl.popup
46
47 Method:
48     <method name="showPopup">
49       <arg name="type" type="i" direction="in"/>
50       <arg name="text" type="s" direction="in"/>
51     </method>
52
53 Preconditions:
54 - HomeScreen app is running
55
56 Test:
57 $dbus-send --session --type=method_call --dest=org.agl.homescreen /Popup org.agl.popup.showPopup int32:1 string:"TEST"
58
59 Method:
60     <method name="showPopupComboBox">
61       <arg name="text" type="s" direction="in"/>
62       <arg name="choices" type="as" direction="in"/>
63     </method>
64
65 Preconditions:
66 - HomeScreen app is running
67
68 Test:
69 $dbus-send --session --type=method_call --dest=org.agl.homescreen /Popup org.agl.popup.showPopupComboBox string:"TEST" array:string:"test1","test2"
70
71 ---------------------------------------------------------------------------------------------------------------------
72 Interface:
73 org.agl.proximity
74
75 Method:
76     <method name="setObjectDetected">
77       <arg name="detected" type="b" direction="in"/>
78     </method>
79
80 Preconditions:
81 - HomeScreen app is running
82
83 Test:
84 $dbus-send --session --type=method_call --dest=org.agl.homescreen /Proximity org.agl.proximity.setObjectDetected boolean:true
85
86 ---------------------------------------------------------------------------------------------------------------------
87 Interface:
88 org.agl.statusbar
89
90 Method:
91       <method name="getAvailablePlaceholders">
92         <arg name="placeholderIndexes" type="ai" direction="out"/>
93         <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QList&lt;int&gt;"/>
94       </method>
95
96 Preconditions:
97 - HomeScreen app is running
98
99 Test:
100 $dbus-send --session --type=method_call --print-reply --dest=org.agl.homescreen /StatusBar org.agl.statusbar.getAvailablePlaceholders
101
102 Method:
103       <method name="getStatusText">
104         <arg name="placeholderIndex" type="i" direction="in"/>
105         <arg name="text" type="s" direction="out"/>
106       </method>
107
108 Preconditions:
109 - HomeScreen app is running
110
111 Test:
112 $dbus-send --session --type=method_call --print-reply --dest=org.agl.homescreen /StatusBar org.agl.statusbar.getStatusText int32:1
113
114 Method:
115       <method name="getStatusIcon">
116         <arg name="placeholderIndex" type="i" direction="in"/>
117         <arg name="iconURI" type="s" direction="out"/>
118       </method>
119
120 Preconditions:
121 - HomeScreen app is running
122
123 Test:
124 $dbus-send --session --type=method_call --print-reply --dest=org.agl.homescreen /StatusBar org.agl.statusbar.getStatusIcon int32:1
125
126 Method:
127       <method name="setStatusText">
128         <arg name="placeholderIndex" type="i" direction="in"/>
129         <arg name="text" type="s" direction="in"/>
130       </method>
131
132 Preconditions:
133 - HomeScreen app is running
134
135 Test:
136 $dbus-send --session --type=method_call --print-reply --dest=org.agl.homescreen /StatusBar org.agl.statusbar.setStatusText int32:1 string:"Test1"
137
138 Method:
139       <method name="setStatusIcon">
140         <arg name="placeholderIndex" type="i" direction="in"/>
141         <arg name="iconURI" type="s" direction="in"/>
142       </method>
143
144 Preconditions:
145 - HomeScreen app is running
146
147 Test:
148 $dbus-send --session --type=method_call --print-reply --dest=org.agl.homescreen /StatusBar org.agl.statusbar.setStatusIcon int32:1 string:"<path to png file here>"
149
150