summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2017-07-22 10:55:04 +0200
committerDave Andreoli <dave@gurumeditation.it>2017-07-22 10:55:04 +0200
commit741000d423deafb01c80c93eef323188234c18f0 (patch)
tree856131073d736e097367c10ac4104ed9e114ab12
parentfecc0c2604619ab69508a0d9ce994ebf1cef47b9 (diff)
Move elm external test from edje to elm
elm widgets need an elm parent to work correctly, so it's better to use an elm win instead of a ecore evas one.
-rw-r--r--tests/edje/theme.edc375
-rw-r--r--tests/edje/theme.edjbin15999 -> 13570 bytes
-rw-r--r--tests/elementary/test_04_external.py (renamed from tests/edje/test_03_external.py)127
-rw-r--r--tests/elementary/theme.edc349
-rw-r--r--tests/elementary/theme.edjbin0 -> 12331 bytes
5 files changed, 394 insertions, 457 deletions
diff --git a/tests/edje/theme.edc b/tests/edje/theme.edc
index 4829d0d..f36c6a3 100644
--- a/tests/edje/theme.edc
+++ b/tests/edje/theme.edc
@@ -154,381 +154,6 @@ collections {
154 y: 1 0 0; 154 y: 1 0 0;
155 } 155 }
156 } 156 }
157 //// Externals (hiddens, only used for the unittests)
158 part { name: "ext_elm_actionslider";
159 type: EXTERNAL;
160 source: "elm/actionslider";
161 description { state: "default" 0.0;
162 visible: 0;
163 params {
164 string: "label" "ActionSlideR";
165 }
166 }
167 }
168 part { name: "ext_elm_bg";
169 type: EXTERNAL;
170 source: "elm/bg";
171 description { state: "default" 0.0;
172 visible: 0;
173 params {
174 // TODO
175 }
176 }
177 }
178 part { name: "ext_elm_bubble";
179 type: EXTERNAL;
180 source: "elm/bubble";
181 description { state: "default" 0.0;
182 visible: 0;
183 params {
184 // TODO
185 }
186 }
187 }
188 part { name: "ext_elm_button";
189 type: EXTERNAL;
190 source: "elm/button";
191 description { state: "default" 0.0;
192 visible: 0;
193 params {
194 // TODO
195 }
196 }
197 }
198 part { name: "ext_elm_calendar";
199 type: EXTERNAL;
200 source: "elm/calendar";
201 description { state: "default" 0.0;
202 visible: 0;
203 params {
204 // TODO
205 }
206 }
207 }
208 part { name: "ext_elm_check";
209 type: EXTERNAL;
210 source: "elm/check";
211 description { state: "default" 0.0;
212 visible: 0;
213 params {
214 // TODO
215 }
216 }
217 }
218 part { name: "ext_elm_clock";
219 type: EXTERNAL;
220 source: "elm/clock";
221 description { state: "default" 0.0;
222 visible: 0;
223 params {
224 int: "hours" 23;
225 int: "minutes" 58;
226 int: "seconds" 59;
227 bool: "editable" 1;
228 bool: "am/pm" 1;
229 bool: "show seconds" 1;
230 }
231 }
232 }
233 part { name: "ext_elm_entry";
234 type: EXTERNAL;
235 source: "elm/entry";
236 description { state: "default" 0.0;
237 visible: 0;
238 params {
239 // TODO
240 }
241 }
242 }
243 part { name: "ext_elm_fileselector";
244 type: EXTERNAL;
245 source: "elm/fileselector";
246 description { state: "default" 0.0;
247 visible: 0;
248 params {
249 // TODO
250 }
251 }
252 }
253 part { name: "ext_elm_fileselector_button";
254 type: EXTERNAL;
255 source: "elm/fileselector_button";
256 description { state: "default" 0.0;
257 visible: 0;
258 params {
259 // TODO
260 }
261 }
262 }
263 part { name: "ext_elm_fileselector_entry";
264 type: EXTERNAL;
265 source: "elm/fileselector_entry";
266 description { state: "default" 0.0;
267 visible: 0;
268 params {
269 // TODO
270 }
271 }
272 }
273 part { name: "ext_elm_frame";
274 type: EXTERNAL;
275 source: "elm/frame";
276 description { state: "default" 0.0;
277 visible: 0;
278 params {
279 // TODO
280 }
281 }
282 }
283 part { name: "ext_elm_gengrid";
284 type: EXTERNAL;
285 source: "elm/gengrid";
286 description { state: "default" 0.0;
287 visible: 0;
288 params {
289 // TODO
290 }
291 }
292 }
293 part { name: "ext_elm_genlist";
294 type: EXTERNAL;
295 source: "elm/genlist";
296 description { state: "default" 0.0;
297 visible: 0;
298 params {
299 // TODO
300 }
301 }
302 }
303 part { name: "ext_elm_hoversel";
304 type: EXTERNAL;
305 source: "elm/hoversel";
306 description { state: "default" 0.0;
307 visible: 0;
308 params {
309 // TODO
310 }
311 }
312 }
313 part { name: "ext_elm_icon";
314 type: EXTERNAL;
315 source: "elm/icon";
316 description { state: "default" 0.0;
317 visible: 0;
318 params {
319 // TODO
320 }
321 }
322 }
323 part { name: "ext_elm_index";
324 type: EXTERNAL;
325 source: "elm/index";
326 description { state: "default" 0.0;
327 visible: 0;
328 params {
329 // TODO
330 }
331 }
332 }
333 part { name: "ext_elm_label";
334 type: EXTERNAL;
335 source: "elm/label";
336 description { state: "default" 0.0;
337 visible: 0;
338 params {
339 string: "label" "This is an elm label";
340 }
341 }
342 }
343 part { name: "ext_elm_list";
344 type: EXTERNAL;
345 source: "elm/list";
346 description { state: "default" 0.0;
347 visible: 0;
348 params {
349 // TODO
350 }
351 }
352 }
353 part { name: "ext_elm_map";
354 type: EXTERNAL;
355 source: "elm/map";
356 description { state: "default" 0.0;
357 visible: 0;
358 params {
359 // TODO
360 }
361 }
362 }
363 part { name: "ext_elm_multibuttonentry";
364 type: EXTERNAL;
365 source: "elm/multibuttonentry";
366 description { state: "default" 0.0;
367 visible: 0;
368 params {
369 // TODO
370 }
371 }
372 }
373 part { name: "ext_elm_naviframe";
374 type: EXTERNAL;
375 source: "elm/naviframe";
376 description { state: "default" 0.0;
377 visible: 0;
378 params {
379 // TODO
380 }
381 }
382 }
383 part { name: "ext_elm_notify";
384 type: EXTERNAL;
385 source: "elm/notify";
386 description { state: "default" 0.0;
387 visible: 0;
388 params {
389 // TODO
390 }
391 }
392 }
393 part { name: "ext_elm_panes";
394 type: EXTERNAL;
395 source: "elm/panes";
396 description { state: "default" 0.0;
397 visible: 0;
398 params {
399 // TODO
400 }
401 }
402 }
403 part { name: "ext_elm_photocam";
404 type: EXTERNAL;
405 source: "elm/photocam";
406 description { state: "default" 0.0;
407 visible: 0;
408 params {
409 // TODO
410 }
411 }
412 }
413 part { name: "ext_elm_progressbar";
414 type: EXTERNAL;
415 source: "elm/progressbar";
416 description { state: "default" 0.0;
417 visible: 0;
418 params {
419 // TODO
420 }
421 }
422 }
423 part { name: "ext_elm_radio";
424 type: EXTERNAL;
425 source: "elm/radio";
426 description { state: "default" 0.0;
427 visible: 0;
428 params {
429 // TODO
430 }
431 }
432 }
433 part { name: "ext_elm_scroller";
434 type: EXTERNAL;
435 source: "elm/scroller";
436 description { state: "default" 0.0;
437 visible: 0;
438 params {
439 // TODO
440 }
441 }
442 }
443 part { name: "ext_elm_segment_control";
444 type: EXTERNAL;
445 source: "elm/segment_control";
446 description { state: "default" 0.0;
447 visible: 0;
448 params {
449 // TODO
450 }
451 }
452 }
453 part { name: "ext_elm_slider";
454 type: EXTERNAL;
455 source: "elm/slider";
456 description { state: "default" 0.0;
457 visible: 0;
458 params {
459 string: "label" "external slider";
460 double: "min" -1;
461 double: "max" 999;
462 double: "value" 0.6;
463 bool: "inverted" 1;
464 bool: "horizontal" 1;
465 int: "span" 45;
466 string: "unit format" "test %f";
467 string: "indicator format" "%f ind";
468 string: "icon" "folder";
469 }
470 }
471 }
472 part { name: "ext_elm_slideshow";
473 type: EXTERNAL;
474 source: "elm/slideshow";
475 description { state: "default" 0.0;
476 visible: 0;
477 params {
478 // TODO
479 }
480 }
481 }
482 part { name: "ext_elm_spinner";
483 type: EXTERNAL;
484 source: "elm/spinner";
485 description { state: "default" 0.0;
486 visible: 0;
487 params {
488 // TODO
489 }
490 }
491 }
492 part { name: "ext_elm_thumb";
493 type: EXTERNAL;
494 source: "elm/thumb";
495 description { state: "default" 0.0;
496 visible: 0;
497 params {
498 // TODO
499 }
500 }
501 }
502 part { name: "ext_elm_toolbar";
503 type: EXTERNAL;
504 source: "elm/toolbar";
505 description { state: "default" 0.0;
506 visible: 0;
507 params {
508 // TODO
509 }
510 }
511 }
512 part { name: "ext_elm_video";
513 type: EXTERNAL;
514 source: "elm/video";
515 description { state: "default" 0.0;
516 visible: 0;
517 params {
518 // TODO
519 }
520 }
521 }
522 part { name: "ext_elm_web";
523 type: EXTERNAL;
524 source: "elm/web";
525 description { state: "default" 0.0;
526 visible: 0;
527 params {
528 // TODO
529 }
530 }
531 }
532 } 157 }
533 programs { 158 programs {
534 program { name: "emit_back_message"; 159 program { name: "emit_back_message";
diff --git a/tests/edje/theme.edj b/tests/edje/theme.edj
index 1b06d61..3fa45d1 100644
--- a/tests/edje/theme.edj
+++ b/tests/edje/theme.edj
Binary files differ
diff --git a/tests/edje/test_03_external.py b/tests/elementary/test_04_external.py
index 757f03f..cdbe1e0 100644
--- a/tests/edje/test_03_external.py
+++ b/tests/elementary/test_04_external.py
@@ -5,43 +5,7 @@ import logging
5 5
6from efl import evas 6from efl import evas
7from efl import edje 7from efl import edje
8 8from efl import elementary as elm
9from efl.elementary.actionslider import Actionslider
10from efl.elementary.background import Background
11from efl.elementary.bubble import Bubble
12from efl.elementary.button import Button
13from efl.elementary.calendar_elm import Calendar
14from efl.elementary.check import Check
15from efl.elementary.clock import Clock
16from efl.elementary.entry import Entry
17from efl.elementary.fileselector import Fileselector
18from efl.elementary.fileselector_button import FileselectorButton
19from efl.elementary.fileselector_entry import FileselectorEntry
20from efl.elementary.frame import Frame
21from efl.elementary.gengrid import Gengrid
22from efl.elementary.genlist import Genlist
23from efl.elementary.hoversel import Hoversel
24from efl.elementary.icon import Icon
25from efl.elementary.index import Index
26from efl.elementary.label import Label
27from efl.elementary.list import List
28from efl.elementary.map import Map
29from efl.elementary.multibuttonentry import MultiButtonEntry
30from efl.elementary.naviframe import Naviframe
31from efl.elementary.notify import Notify
32from efl.elementary.panes import Panes
33from efl.elementary.photocam import Photocam
34from efl.elementary.progressbar import Progressbar
35from efl.elementary.radio import Radio
36from efl.elementary.scroller import Scroller
37from efl.elementary.segment_control import SegmentControl
38from efl.elementary.slider import Slider
39from efl.elementary.slideshow import Slideshow
40from efl.elementary.spinner import Spinner
41from efl.elementary.toolbar import Toolbar
42from efl.elementary.thumb import Thumb
43from efl.elementary.video import Video
44from efl.elementary.web import Web
45 9
46 10
47theme_path = os.path.dirname(os.path.abspath(__file__)) 11theme_path = os.path.dirname(os.path.abspath(__file__))
@@ -50,19 +14,18 @@ theme_file = os.path.join(theme_path, "theme.edj")
50 14
51class TestElementaryExternal(unittest.TestCase): 15class TestElementaryExternal(unittest.TestCase):
52 def setUp(self): 16 def setUp(self):
53 self.canvas = evas.Canvas(method="buffer", 17 self.win = elm.Window("t", elm.ELM_WIN_BASIC)
54 size=(400, 500), 18 self.layout = elm.Layout(self.win, file=(theme_file, "main"))
55 viewport=(0, 0, 400, 500)) 19 self.theme = self.layout.edje
56 self.canvas.engine_info_set(self.canvas.engine_info_get())
57 self.theme = edje.Edje(self.canvas, file=theme_file, group="main")
58 20
59 def tearDown(self): 21 def tearDown(self):
60 self.theme.delete() 22 # TODO: This is correct but throw lots of Eo errors (to be fixed in efl)
61 self.canvas.delete() 23 # self.win.delete()
24 pass
62 25
63 def testExternalActionslider(self): 26 def testExternalActionslider(self):
64 elm_as = self.theme.part_external_object_get("ext_elm_actionslider") 27 elm_as = self.theme.part_external_object_get("ext_elm_actionslider")
65 self.assertIsInstance(elm_as, Actionslider) 28 self.assertIsInstance(elm_as, elm.Actionslider)
66 29
67 # check values set in edc (from external) 30 # check values set in edc (from external)
68 self.assertEqual(self.theme.part_external_param_get("ext_elm_actionslider", "label"), "ActionSlideR") 31 self.assertEqual(self.theme.part_external_param_get("ext_elm_actionslider", "label"), "ActionSlideR")
@@ -79,37 +42,37 @@ class TestElementaryExternal(unittest.TestCase):
79 42
80 def testExternalBackground(self): 43 def testExternalBackground(self):
81 elm_bg = self.theme.part_external_object_get("ext_elm_bg") 44 elm_bg = self.theme.part_external_object_get("ext_elm_bg")
82 self.assertIsInstance(elm_bg, Background) 45 self.assertIsInstance(elm_bg, elm.Background)
83 46
84 # TODO test params 47 # TODO test params
85 48
86 def testExternalBubble(self): 49 def testExternalBubble(self):
87 elm_bg = self.theme.part_external_object_get("ext_elm_bubble") 50 elm_bg = self.theme.part_external_object_get("ext_elm_bubble")
88 self.assertIsInstance(elm_bg, Bubble) 51 self.assertIsInstance(elm_bg, elm.Bubble)
89 52
90 # TODO test params 53 # TODO test params
91 54
92 def testExternalButton(self): 55 def testExternalButton(self):
93 elm_button = self.theme.part_external_object_get("ext_elm_button") 56 elm_button = self.theme.part_external_object_get("ext_elm_button")
94 self.assertIsInstance(elm_button, Button) 57 self.assertIsInstance(elm_button, elm.Button)
95 58
96 # TODO test params 59 # TODO test params
97 60
98 def testExternalCalendar(self): 61 def testExternalCalendar(self):
99 elm_cal = self.theme.part_external_object_get("ext_elm_calendar") 62 elm_cal = self.theme.part_external_object_get("ext_elm_calendar")
100 self.assertIsInstance(elm_cal, Calendar) 63 self.assertIsInstance(elm_cal, elm.Calendar)
101 64
102 # TODO test params 65 # TODO test params
103 66
104 def testExternalCheck(self): 67 def testExternalCheck(self):
105 elm_check = self.theme.part_external_object_get("ext_elm_check") 68 elm_check = self.theme.part_external_object_get("ext_elm_check")
106 self.assertIsInstance(elm_check, Check) 69 self.assertIsInstance(elm_check, elm.Check)
107 70
108 # TODO test params 71 # TODO test params
109 72
110 def testExternalClock(self): 73 def testExternalClock(self):
111 elm_clock = self.theme.part_external_object_get("ext_elm_clock") 74 elm_clock = self.theme.part_external_object_get("ext_elm_clock")
112 self.assertIsInstance(elm_clock, Clock) 75 self.assertIsInstance(elm_clock, elm.Clock)
113 76
114 # check values set in edc (from external) 77 # check values set in edc (from external)
115 self.assertEqual(self.theme.part_external_param_get("ext_elm_clock", "hours"), 23) 78 self.assertEqual(self.theme.part_external_param_get("ext_elm_clock", "hours"), 23)
@@ -141,67 +104,67 @@ class TestElementaryExternal(unittest.TestCase):
141 104
142 def testExternalEntry(self): 105 def testExternalEntry(self):
143 elm_entry = self.theme.part_external_object_get("ext_elm_entry") 106 elm_entry = self.theme.part_external_object_get("ext_elm_entry")
144 self.assertIsInstance(elm_entry, Entry) 107 self.assertIsInstance(elm_entry, elm.Entry)
145 108
146 # TODO test params 109 # TODO test params
147 110
148 def testExternalFileselector(self): 111 def testExternalFileselector(self):
149 elm_fs = self.theme.part_external_object_get("ext_elm_fileselector") 112 elm_fs = self.theme.part_external_object_get("ext_elm_fileselector")
150 self.assertIsInstance(elm_fs, Fileselector) 113 self.assertIsInstance(elm_fs, elm.Fileselector)
151 114
152 # TODO test params 115 # TODO test params
153 116
154 def testExternalFileselectorButton(self): 117 def testExternalFileselectorButton(self):
155 elm_fs_btn = self.theme.part_external_object_get("ext_elm_fileselector_button") 118 elm_fs_btn = self.theme.part_external_object_get("ext_elm_fileselector_button")
156 self.assertIsInstance(elm_fs_btn, FileselectorButton) 119 self.assertIsInstance(elm_fs_btn, elm.FileselectorButton)
157 120
158 # TODO test params 121 # TODO test params
159 122
160 def testExternalFileselectorEntry(self): 123 def testExternalFileselectorEntry(self):
161 elm_fs_en = self.theme.part_external_object_get("ext_elm_fileselector_entry") 124 elm_fs_en = self.theme.part_external_object_get("ext_elm_fileselector_entry")
162 self.assertIsInstance(elm_fs_en, FileselectorEntry) 125 self.assertIsInstance(elm_fs_en, elm.FileselectorEntry)
163 126
164 # TODO test params 127 # TODO test params
165 128
166 def testExternalFrame(self): 129 def testExternalFrame(self):
167 elm_frame = self.theme.part_external_object_get("ext_elm_frame") 130 elm_frame = self.theme.part_external_object_get("ext_elm_frame")
168 self.assertIsInstance(elm_frame, Frame) 131 self.assertIsInstance(elm_frame, elm.Frame)
169 132
170 # TODO test params 133 # TODO test params
171 134
172 def testExternalGengrid(self): 135 def testExternalGengrid(self):
173 elm_gg = self.theme.part_external_object_get("ext_elm_gengrid") 136 elm_gg = self.theme.part_external_object_get("ext_elm_gengrid")
174 self.assertIsInstance(elm_gg, Gengrid) 137 self.assertIsInstance(elm_gg, elm.Gengrid)
175 138
176 # TODO test params 139 # TODO test params
177 140
178 def testExternalGenlist(self): 141 def testExternalGenlist(self):
179 elm_gl = self.theme.part_external_object_get("ext_elm_genlist") 142 elm_gl = self.theme.part_external_object_get("ext_elm_genlist")
180 self.assertIsInstance(elm_gl, Genlist) 143 self.assertIsInstance(elm_gl, elm.Genlist)
181 144
182 # TODO test params 145 # TODO test params
183 146
184 def testExternalHoversel(self): 147 def testExternalHoversel(self):
185 elm_hoversel = self.theme.part_external_object_get("ext_elm_hoversel") 148 elm_hoversel = self.theme.part_external_object_get("ext_elm_hoversel")
186 self.assertIsInstance(elm_hoversel, Hoversel) 149 self.assertIsInstance(elm_hoversel, elm.Hoversel)
187 150
188 # TODO test params 151 # TODO test params
189 152
190 def testExternalIcon(self): 153 def testExternalIcon(self):
191 elm_icon = self.theme.part_external_object_get("ext_elm_icon") 154 elm_icon = self.theme.part_external_object_get("ext_elm_icon")
192 self.assertIsInstance(elm_icon, Icon) 155 self.assertIsInstance(elm_icon, elm.Icon)
193 156
194 # TODO test params 157 # TODO test params
195 158
196 def testExternalIndex(self): 159 def testExternalIndex(self):
197 elm_index = self.theme.part_external_object_get("ext_elm_index") 160 elm_index = self.theme.part_external_object_get("ext_elm_index")
198 self.assertIsInstance(elm_index, Index) 161 self.assertIsInstance(elm_index, elm.Index)
199 162
200 # TODO test params 163 # TODO test params
201 164
202 def testExternalLabel(self): 165 def testExternalLabel(self):
203 elm_label = self.theme.part_external_object_get("ext_elm_label") 166 elm_label = self.theme.part_external_object_get("ext_elm_label")
204 self.assertIsInstance(elm_label, Label) 167 self.assertIsInstance(elm_label, elm.Label)
205 168
206 # check values setted in edc (from external) 169 # check values setted in edc (from external)
207 self.assertEqual(self.theme.part_external_param_get("ext_elm_label", "label"), "This is an elm label") 170 self.assertEqual(self.theme.part_external_param_get("ext_elm_label", "label"), "This is an elm label")
@@ -218,73 +181,73 @@ class TestElementaryExternal(unittest.TestCase):
218 181
219 def testExternalList(self): 182 def testExternalList(self):
220 elm_list = self.theme.part_external_object_get("ext_elm_list") 183 elm_list = self.theme.part_external_object_get("ext_elm_list")
221 self.assertIsInstance(elm_list, List) 184 self.assertIsInstance(elm_list, elm.List)
222 185
223 # TODO test params 186 # TODO test params
224 187
225 def testExternalMap(self): 188 def testExternalMap(self):
226 elm_map = self.theme.part_external_object_get("ext_elm_map") 189 elm_map = self.theme.part_external_object_get("ext_elm_map")
227 self.assertIsInstance(elm_map, Map) 190 self.assertIsInstance(elm_map, elm.Map)
228 191
229 # TODO test params 192 # TODO test params
230 193
231 def testExternalMultibuttonentry(self): 194 def testExternalMultibuttonentry(self):
232 elm_mbe = self.theme.part_external_object_get("ext_elm_multibuttonentry") 195 elm_mbe = self.theme.part_external_object_get("ext_elm_multibuttonentry")
233 self.assertIsInstance(elm_mbe, MultiButtonEntry) 196 self.assertIsInstance(elm_mbe, elm.MultiButtonEntry)
234 197
235 # TODO test params 198 # TODO test params
236 199
237 def testExternalNaviframe(self): 200 def testExternalNaviframe(self):
238 elm_nf = self.theme.part_external_object_get("ext_elm_naviframe") 201 elm_nf = self.theme.part_external_object_get("ext_elm_naviframe")
239 self.assertIsInstance(elm_nf, Naviframe) 202 self.assertIsInstance(elm_nf, elm.Naviframe)
240 203
241 # TODO test params 204 # TODO test params
242 205
243 def testExternalNotify(self): 206 def testExternalNotify(self):
244 elm_notify = self.theme.part_external_object_get("ext_elm_notify") 207 elm_notify = self.theme.part_external_object_get("ext_elm_notify")
245 self.assertIsInstance(elm_notify, Notify) 208 self.assertIsInstance(elm_notify, elm.Notify)
246 209
247 # TODO test params 210 # TODO test params
248 211
249 def testExternalPanes(self): 212 def testExternalPanes(self):
250 elm_panes = self.theme.part_external_object_get("ext_elm_panes") 213 elm_panes = self.theme.part_external_object_get("ext_elm_panes")
251 self.assertIsInstance(elm_panes, Panes) 214 self.assertIsInstance(elm_panes, elm.Panes)
252 215
253 # TODO test params 216 # TODO test params
254 217
255 def testExternalPhotocam(self): 218 def testExternalPhotocam(self):
256 elm_photocam = self.theme.part_external_object_get("ext_elm_photocam") 219 elm_photocam = self.theme.part_external_object_get("ext_elm_photocam")
257 self.assertIsInstance(elm_photocam, Photocam) 220 self.assertIsInstance(elm_photocam, elm.Photocam)
258 221
259 # TODO test params 222 # TODO test params
260 223
261 def testExternalProgressbar(self): 224 def testExternalProgressbar(self):
262 elm_pb = self.theme.part_external_object_get("ext_elm_progressbar") 225 elm_pb = self.theme.part_external_object_get("ext_elm_progressbar")
263 self.assertIsInstance(elm_pb, Progressbar) 226 self.assertIsInstance(elm_pb, elm.Progressbar)
264 227
265 # TODO test params 228 # TODO test params
266 229
267 def testExternalRadio(self): 230 def testExternalRadio(self):
268 elm_radio = self.theme.part_external_object_get("ext_elm_radio") 231 elm_radio = self.theme.part_external_object_get("ext_elm_radio")
269 self.assertIsInstance(elm_radio, Radio) 232 self.assertIsInstance(elm_radio, elm.Radio)
270 233
271 # TODO test params 234 # TODO test params
272 235
273 def testExternalScroller(self): 236 def testExternalScroller(self):
274 elm_scroller = self.theme.part_external_object_get("ext_elm_scroller") 237 elm_scroller = self.theme.part_external_object_get("ext_elm_scroller")
275 self.assertIsInstance(elm_scroller, Scroller) 238 self.assertIsInstance(elm_scroller, elm.Scroller)
276 239
277 # TODO test params 240 # TODO test params
278 241
279 def testExternalSegmentControl(self): 242 def testExternalSegmentControl(self):
280 elm_sc = self.theme.part_external_object_get("ext_elm_segment_control") 243 elm_sc = self.theme.part_external_object_get("ext_elm_segment_control")
281 self.assertIsInstance(elm_sc, SegmentControl) 244 self.assertIsInstance(elm_sc, elm.SegmentControl)
282 245
283 # TODO test params 246 # TODO test params
284 247
285 def testExternalSlider(self): 248 def testExternalSlider(self):
286 elm_slider = self.theme.part_external_object_get("ext_elm_slider") 249 elm_slider = self.theme.part_external_object_get("ext_elm_slider")
287 self.assertIsInstance(elm_slider, Slider) 250 self.assertIsInstance(elm_slider, elm.Slider)
288 251
289 # check values setted in edc (from external) 252 # check values setted in edc (from external)
290 self.assertEqual(self.theme.part_external_param_get("ext_elm_slider", "label"), "external slider") 253 self.assertEqual(self.theme.part_external_param_get("ext_elm_slider", "label"), "external slider")
@@ -306,7 +269,7 @@ class TestElementaryExternal(unittest.TestCase):
306 self.assertEqual(elm_slider.span_size, 45) 269 self.assertEqual(elm_slider.span_size, 45)
307 self.assertEqual(elm_slider.unit_format, "test %f") 270 self.assertEqual(elm_slider.unit_format, "test %f")
308 self.assertEqual(elm_slider.indicator_format, "%f ind") 271 self.assertEqual(elm_slider.indicator_format, "%f ind")
309 self.assertIsInstance(elm_slider.icon, Icon) 272 self.assertIsInstance(elm_slider.icon, elm.Icon)
310 273
311 # do params set 274 # do params set
312 self.theme.part_external_param_set("ext_elm_slider", "label", "new text") 275 self.theme.part_external_param_set("ext_elm_slider", "label", "new text")
@@ -329,42 +292,42 @@ class TestElementaryExternal(unittest.TestCase):
329 self.assertEqual(elm_slider.span_size, 11) 292 self.assertEqual(elm_slider.span_size, 11)
330 self.assertEqual(elm_slider.unit_format, "uf") 293 self.assertEqual(elm_slider.unit_format, "uf")
331 self.assertEqual(elm_slider.indicator_format, "if") 294 self.assertEqual(elm_slider.indicator_format, "if")
332 self.assertIsInstance(elm_slider.icon, Icon) 295 self.assertIsInstance(elm_slider.icon, elm.Icon)
333 296
334 def testExternalSlideshow(self): 297 def testExternalSlideshow(self):
335 elm_ss = self.theme.part_external_object_get("ext_elm_slideshow") 298 elm_ss = self.theme.part_external_object_get("ext_elm_slideshow")
336 self.assertIsInstance(elm_ss, Slideshow) 299 self.assertIsInstance(elm_ss, elm.Slideshow)
337 300
338 # TODO test params 301 # TODO test params
339 302
340 def testExternalSpinner(self): 303 def testExternalSpinner(self):
341 elm_spinner = self.theme.part_external_object_get("ext_elm_spinner") 304 elm_spinner = self.theme.part_external_object_get("ext_elm_spinner")
342 self.assertIsInstance(elm_spinner, Spinner) 305 self.assertIsInstance(elm_spinner, elm.Spinner)
343 306
344 # TODO test params 307 # TODO test params
345 308
346 def testExternalThumb(self): 309 def testExternalThumb(self):
347 elm_thumb = self.theme.part_external_object_get("ext_elm_thumb") 310 elm_thumb = self.theme.part_external_object_get("ext_elm_thumb")
348 self.assertIsInstance(elm_thumb, Thumb) 311 self.assertIsInstance(elm_thumb, elm.Thumb)
349 312
350 # TODO test params 313 # TODO test params
351 314
352 def testExternalToolbar(self): 315 def testExternalToolbar(self):
353 elm_toolbar = self.theme.part_external_object_get("ext_elm_toolbar") 316 elm_toolbar = self.theme.part_external_object_get("ext_elm_toolbar")
354 self.assertIsInstance(elm_toolbar, Toolbar) 317 self.assertIsInstance(elm_toolbar, elm.Toolbar)
355 318
356 # TODO test params 319 # TODO test params
357 320
358 def testExternalVideo(self): 321 def testExternalVideo(self):
359 elm_video = self.theme.part_external_object_get("ext_elm_video") 322 elm_video = self.theme.part_external_object_get("ext_elm_video")
360 self.assertIsInstance(elm_video, Video) 323 self.assertIsInstance(elm_video, elm.Video)
361 324
362 # TODO test params 325 # TODO test params
363 326
364 @unittest.skip("Elm Web not maintained atm") 327 @unittest.skip("Elm Web not maintained atm")
365 def testExternalWeb(self): 328 def testExternalWeb(self):
366 elm_web = self.theme.part_external_object_get("ext_elm_web") 329 elm_web = self.theme.part_external_object_get("ext_elm_web")
367 self.assertIsInstance(elm_web, Web) 330 self.assertIsInstance(elm_web, elm.Web)
368 331
369 # TODO test params 332 # TODO test params
370 333
diff --git a/tests/elementary/theme.edc b/tests/elementary/theme.edc
new file mode 100644
index 0000000..78f9b4a
--- /dev/null
+++ b/tests/elementary/theme.edc
@@ -0,0 +1,349 @@
1
2externals {
3 external: "elm";
4}
5
6collections {
7 group { name: "main";
8 parts {
9 part { name: "ext_elm_actionslider";
10 type: EXTERNAL;
11 source: "elm/actionslider";
12 description { state: "default";
13 params {
14 string: "label" "ActionSlideR";
15 }
16 }
17 }
18 part { name: "ext_elm_bg";
19 type: EXTERNAL;
20 source: "elm/bg";
21 description { state: "default";
22 params {
23 // TODO
24 }
25 }
26 }
27 part { name: "ext_elm_bubble";
28 type: EXTERNAL;
29 source: "elm/bubble";
30 description { state: "default";
31 params {
32 // TODO
33 }
34 }
35 }
36 part { name: "ext_elm_button";
37 type: EXTERNAL;
38 source: "elm/button";
39 description { state: "default";
40 params {
41 // TODO
42 }
43 }
44 }
45 part { name: "ext_elm_calendar";
46 type: EXTERNAL;
47 source: "elm/calendar";
48 description { state: "default";
49 params {
50 // TODO
51 }
52 }
53 }
54 part { name: "ext_elm_check";
55 type: EXTERNAL;
56 source: "elm/check";
57 description { state: "default";
58 params {
59 // TODO
60 }
61 }
62 }
63 part { name: "ext_elm_clock";
64 type: EXTERNAL;
65 source: "elm/clock";
66 description { state: "default";
67 params {
68 int: "hours" 23;
69 int: "minutes" 58;
70 int: "seconds" 59;
71 bool: "editable" 1;
72 bool: "am/pm" 1;
73 bool: "show seconds" 1;
74 }
75 }
76 }
77 part { name: "ext_elm_entry";
78 type: EXTERNAL;
79 source: "elm/entry";
80 description { state: "default";
81 params {
82 // TODO
83 }
84 }
85 }
86 part { name: "ext_elm_fileselector";
87 type: EXTERNAL;
88 source: "elm/fileselector";
89 description { state: "default";
90 params {
91 // TODO
92 }
93 }
94 }
95 part { name: "ext_elm_fileselector_button";
96 type: EXTERNAL;
97 source: "elm/fileselector_button";
98 description { state: "default";
99 params {
100 // TODO
101 }
102 }
103 }
104 part { name: "ext_elm_fileselector_entry";
105 type: EXTERNAL;
106 source: "elm/fileselector_entry";
107 description { state: "default";
108 params {
109 // TODO
110 }
111 }
112 }
113 part { name: "ext_elm_frame";
114 type: EXTERNAL;
115 source: "elm/frame";
116 description { state: "default";
117 params {
118 // TODO
119 }
120 }
121 }
122 part { name: "ext_elm_gengrid";
123 type: EXTERNAL;
124 source: "elm/gengrid";
125 description { state: "default";
126 params {
127 // TODO
128 }
129 }
130 }
131 part { name: "ext_elm_genlist";
132 type: EXTERNAL;
133 source: "elm/genlist";
134 description { state: "default";
135 params {
136 // TODO
137 }
138 }
139 }
140 part { name: "ext_elm_hoversel";
141 type: EXTERNAL;
142 source: "elm/hoversel";
143 description { state: "default";
144 params {
145 // TODO
146 }
147 }
148 }
149 part { name: "ext_elm_icon";
150 type: EXTERNAL;
151 source: "elm/icon";
152 description { state: "default";
153 params {
154 // TODO
155 }
156 }
157 }
158 part { name: "ext_elm_index";
159 type: EXTERNAL;
160 source: "elm/index";
161 description { state: "default";
162 params {
163 // TODO
164 }
165 }
166 }
167 part { name: "ext_elm_label";
168 type: EXTERNAL;
169 source: "elm/label";
170 description { state: "default";
171 params {
172 string: "label" "This is an elm label";
173 }
174 }
175 }
176 part { name: "ext_elm_list";
177 type: EXTERNAL;
178 source: "elm/list";
179 description { state: "default";
180 params {
181 // TODO
182 }
183 }
184 }
185 part { name: "ext_elm_map";
186 type: EXTERNAL;
187 source: "elm/map";
188 description { state: "default";
189 params {
190 // TODO
191 }
192 }
193 }
194 part { name: "ext_elm_multibuttonentry";
195 type: EXTERNAL;
196 source: "elm/multibuttonentry";
197 description { state: "default";
198 params {
199 // TODO
200 }
201 }
202 }
203 part { name: "ext_elm_naviframe";
204 type: EXTERNAL;
205 source: "elm/naviframe";
206 description { state: "default";
207 params {
208 // TODO
209 }
210 }
211 }
212 part { name: "ext_elm_notify";
213 type: EXTERNAL;
214 source: "elm/notify";
215 description { state: "default";
216 params {
217 // TODO
218 }
219 }
220 }
221 part { name: "ext_elm_panes";
222 type: EXTERNAL;
223 source: "elm/panes";
224 description { state: "default";
225 params {
226 // TODO
227 }
228 }
229 }
230 part { name: "ext_elm_photocam";
231 type: EXTERNAL;
232 source: "elm/photocam";
233 description { state: "default";
234 params {
235 // TODO
236 }
237 }
238 }
239 part { name: "ext_elm_progressbar";
240 type: EXTERNAL;
241 source: "elm/progressbar";
242 description { state: "default";
243 params {
244 // TODO
245 }
246 }
247 }
248 part { name: "ext_elm_radio";
249 type: EXTERNAL;
250 source: "elm/radio";
251 description { state: "default";
252 params {
253 // TODO
254 }
255 }
256 }
257 part { name: "ext_elm_scroller";
258 type: EXTERNAL;
259 source: "elm/scroller";
260 description { state: "default";
261 params {
262 // TODO
263 }
264 }
265 }
266 part { name: "ext_elm_segment_control";
267 type: EXTERNAL;
268 source: "elm/segment_control";
269 description { state: "default";
270 params {
271 // TODO
272 }
273 }
274 }
275 part { name: "ext_elm_slider";
276 type: EXTERNAL;
277 source: "elm/slider";
278 description { state: "default";
279 params {
280 string: "label" "external slider";
281 double: "min" -1;
282 double: "max" 999;
283 double: "value" 0.6;
284 bool: "inverted" 1;
285 bool: "horizontal" 1;
286 int: "span" 45;
287 string: "unit format" "test %f";
288 string: "indicator format" "%f ind";
289 string: "icon" "folder";
290 }
291 }
292 }
293 part { name: "ext_elm_slideshow";
294 type: EXTERNAL;
295 source: "elm/slideshow";
296 description { state: "default";
297 params {
298 // TODO
299 }
300 }
301 }
302 part { name: "ext_elm_spinner";
303 type: EXTERNAL;
304 source: "elm/spinner";
305 description { state: "default";
306 params {
307 // TODO
308 }
309 }
310 }
311 part { name: "ext_elm_thumb";
312 type: EXTERNAL;
313 source: "elm/thumb";
314 description { state: "default";
315 params {
316 // TODO
317 }
318 }
319 }
320 part { name: "ext_elm_toolbar";
321 type: EXTERNAL;
322 source: "elm/toolbar";
323 description { state: "default";
324 params {
325 // TODO
326 }
327 }
328 }
329 part { name: "ext_elm_video";
330 type: EXTERNAL;
331 source: "elm/video";
332 description { state: "default";
333 params {
334 // TODO
335 }
336 }
337 }
338 part { name: "ext_elm_web";
339 type: EXTERNAL;
340 source: "elm/web";
341 description { state: "default";
342 params {
343 // TODO
344 }
345 }
346 }
347 }
348 }
349}
diff --git a/tests/elementary/theme.edj b/tests/elementary/theme.edj
new file mode 100644
index 0000000..1be0865
--- /dev/null
+++ b/tests/elementary/theme.edj
Binary files differ