86a09cd262dc53033f6206b14d35bfe2e37ee8f6
[staging/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.appframework
9
10 Method:
11       <method name="getAvailableAppNames">
12         <arg name="names" type="as" direction="out"/>
13       </method>
14
15 Preconditions:
16 - HomeScreenAppFrameworkBinderTizen app is running
17
18 Test:
19 $dbus-send --session --type=method_call --print-reply --dest=org.agl.homescreenappframeworkbindertizen /AppFramework org.agl.appframework.getAvailableAppNames
20
21 Method:
22       <method name="launchApp">
23         <arg name="name" type="s" direction="in"/>
24         <arg name="pid" type="i" direction="out"/>
25       </method>
26
27 Preconditions:
28 - HomeScreenAppFrameworkBinderTizen app is running
29
30 Test:
31 $dbus-send --session --type=method_call --print-reply --dest=org.agl.homescreenappframeworkbindertizen /AppFramework org.agl.appframework.launchApp string:"org.tizen.amhelloworld"
32
33 ---------------------------------------------------------------------------------------------------------------------
34 Interface:
35 org.agl.daynightmode
36
37 Signal:
38     <signal name="dayNightMode">
39       <arg name="mode" type="i" direction="out"/>
40     </signal>
41
42 Preconditions:
43 - HomeScreen app is running
44
45 Test:
46 no command line test available right now
47
48 ---------------------------------------------------------------------------------------------------------------------
49 Interface:
50 org.agl.homescreen
51
52 Method:
53     <method name="hardKeyPressed">
54       <arg name="key" type="i" direction="in"/> <!-- using the inputevent.hpp InputEvent::HardKey type -->
55     </method>
56
57 Preconditions:
58 - HomeScreen app is running
59
60 Test:
61 $dbus-send --session --type=method_call --print-reply --dest=org.agl.homescreen /HomeScreen org.agl.homescreen.hardKeyPressed int32:0
62
63 Method:
64     <method name="setToFullscreen">
65       <arg name="pid" type="i" direction="in"/>
66     </method>
67
68 $dbus-send --session --type=method_call --print-reply --dest=org.agl.homescreen /HomeScreen org.agl.homescreen.setToFullscreen int32:0
69
70 ---------------------------------------------------------------------------------------------------------------------
71 Interface:
72 org.agl.inputevent
73
74 Method:
75     <method name="hardKeyPressed">
76       <arg name="key" type="i" direction="in"/>
77     </method>
78
79 Preconditions:
80 - HomeScreen app is running
81 - InputEventManager app is running
82
83 Test:
84 $dbus-send --session --type=method_call --print-reply --dest=org.agl.inputeventmanager /InputEvent org.agl.inputevent.hardKeyPressed int32:0
85
86 ---------------------------------------------------------------------------------------------------------------------
87 Interface:
88 org.agl.popup
89
90 Method:
91     <method name="showPopup">
92       <arg name="type" type="i" direction="in"/>
93       <arg name="text" type="s" direction="in"/>
94     </method>
95
96 Preconditions:
97 - HomeScreen app is running
98
99 Test:
100 $dbus-send --session --type=method_call --dest=org.agl.homescreen /Popup org.agl.popup.showPopup int32:1 string:"TEST"
101
102 Method:
103     <method name="showPopupComboBox">
104       <arg name="text" type="s" direction="in"/>
105       <arg name="choices" type="as" direction="in"/>
106     </method>
107
108 Preconditions:
109 - HomeScreen app is running
110
111 Test:
112 $dbus-send --session --type=method_call --dest=org.agl.homescreen /Popup org.agl.popup.showPopupComboBox string:"TEST" array:string:"test1","test2"
113
114 ---------------------------------------------------------------------------------------------------------------------
115 Interface:
116 org.agl.proximity
117
118 Method:
119     <method name="setObjectDetected">
120       <arg name="detected" type="b" direction="in"/>
121     </method>
122
123 Preconditions:
124 - HomeScreen app is running
125
126 Test:
127 $dbus-send --session --type=method_call --dest=org.agl.homescreen /Proximity org.agl.proximity.setObjectDetected boolean:true
128
129 ---------------------------------------------------------------------------------------------------------------------
130 Interface:
131 org.agl.statusbar
132
133 Method:
134       <method name="getAvailablePlaceholders">
135         <arg name="placeholderIndexes" type="ai" direction="out"/>
136         <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QList&lt;int&gt;"/>
137       </method>
138
139 Preconditions:
140 - HomeScreen app is running
141
142 Test:
143 $dbus-send --session --type=method_call --print-reply --dest=org.agl.homescreen /StatusBar org.agl.statusbar.getAvailablePlaceholders
144
145 Method:
146       <method name="getStatusText">
147         <arg name="placeholderIndex" type="i" direction="in"/>
148         <arg name="text" type="s" direction="out"/>
149       </method>
150
151 Preconditions:
152 - HomeScreen app is running
153
154 Test:
155 $dbus-send --session --type=method_call --print-reply --dest=org.agl.homescreen /StatusBar org.agl.statusbar.getStatusText int32:1
156
157 Method:
158       <method name="getStatusIcon">
159         <arg name="placeholderIndex" type="i" direction="in"/>
160         <arg name="iconURI" type="s" direction="out"/>
161       </method>
162
163 Preconditions:
164 - HomeScreen app is running
165
166 Test:
167 $dbus-send --session --type=method_call --print-reply --dest=org.agl.homescreen /StatusBar org.agl.statusbar.getStatusIcon int32:1
168
169 Method:
170       <method name="setStatusText">
171         <arg name="placeholderIndex" type="i" direction="in"/>
172         <arg name="text" type="s" direction="in"/>
173       </method>
174
175 Preconditions:
176 - HomeScreen app is running
177
178 Test:
179 $dbus-send --session --type=method_call --print-reply --dest=org.agl.homescreen /StatusBar org.agl.statusbar.setStatusText int32:1 string:"Test1"
180
181 Method:
182       <method name="setStatusIcon">
183         <arg name="placeholderIndex" type="i" direction="in"/>
184         <arg name="iconURI" type="s" direction="in"/>
185       </method>
186
187 Preconditions:
188 - HomeScreen app is running
189
190 Test:
191 $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>"
192
193 ---------------------------------------------------------------------------------------------------------------------
194 Interface:
195 org.agl.windowmanager
196
197 Method:
198       <method name="addLayout">
199         <arg name="layoutId" type="i" direction="in"/>
200         <arg name="layoutName" type="s" direction="in"/>
201         <arg name="surfaceAreas" type="a(iiii)" direction="in"/>
202         <annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QList&lt;SimpleRect&gt;"/>
203         <arg name="error" type="i" direction="out"/>
204       </method>
205
206 Preconditions:
207 - WindowManager app is running
208
209 Test:
210 it is not possible to send isa(iiii) via the dbus-send tool.
211
212 Method:
213       <method name="getAvailableLayouts">
214         <arg name="numberOfAppSurfaces" type="i" direction="in"/>
215         <arg name="layoutIds" type="ai" direction="out"/>
216         <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QList&lt;int&gt;"/>
217       </method>
218
219 Preconditions:
220 - HomeScreen app is running
221 - WindowManager app is running
222
223 Test:
224 $dbus-send --session --type=method_call --print-reply --dest=org.agl.windowmanager /windowmanager org.agl.windowmanager.getAvailableLayouts int32:1
225
226
227
228 Method:
229       <method name="setLayoutById">
230         <arg name="layoutId" type="i" direction="in"/>
231       </method>
232 Preconditions:
233 - HomeScreen app is running
234 - WindowManager app is running
235
236 Test:
237 $dbus-send --session --type=method_call --print-reply --dest=org.agl.windowmanager /windowmanager org.agl.windowmanager.setLayoutById int32:1
238
239 Method:
240       <method name="setLayoutByName">
241         <arg name="layoutName" type="s" direction="in"/>
242       </method>
243
244 Preconditions:
245 - HomeScreen app is running
246 - WindowManager app is running
247
248 Test:
249 $dbus-send --session --type=method_call --print-reply --dest=org.agl.windowmanager /windowmanager org.agl.windowmanager.setLayoutByName string:"name"
250
251 Method:
252       <method name="getLayout">
253         <arg name="layoutId" type="i" direction="out"/>
254       </method>
255
256 Preconditions:
257 - HomeScreen app is running
258 - WindowManager app is running
259
260 Test:
261 $dbus-send --session --type=method_call --print-reply --dest=org.agl.windowmanager /windowmanager org.agl.windowmanager.getLayout
262
263 Method:
264       <method name="setPidToLayoutArea">
265         <arg name="pid" type="i" direction="in"/>
266         <arg name="layoutAreaId" type="i" direction="in"/>
267       </method>
268
269 Preconditions:
270 - HomeScreen app is running
271 - WindowManager app is running
272
273 Test:
274 $dbus-send --session --type=method_call --print-reply --dest=org.agl.windowmanager /windowmanager org.agl.windowmanager.setPidToLayoutArea int32:1123 int32:1
275
276 Method:
277       <method name="getAvailableSurfaces">
278         <arg name="surfacesAndPids" type="a(ii)" direction="out"/>
279         <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QList&lt;SimplePoint&gt;"/>
280       </method>
281
282 Preconditions:
283 - HomeScreen app is running
284 - WindowManager app is running
285
286 Test:
287 $dbus-send --session --type=method_call --print-reply --dest=org.agl.windowmanager /windowmanager org.agl.windowmanager.getAvailableSurfaces
288
289 Method:
290       <method name="getLayoutName">
291         <arg name="layoutId" type="i" direction="in"/>
292         <arg name="layoutName" type="s" direction="out"/>
293       </method>
294
295 Preconditions:
296 - HomeScreen app is running
297 - WindowManager app is running
298
299 Test:
300 $dbus-send --session --type=method_call --print-reply --dest=org.agl.windowmanager /windowmanager org.agl.windowmanager.getLayoutName int32:1
301