efl/src/tests/elementary/spec
Marcel Hollerbach 43edd17f41 efl_ui_single_selectable: add properties and events
this commit adds 2 new features, a new event and a new property

The fallback property is usefull if you want to have a selection that always falls back
to some preconfigured things.
As a usecase, think about a list of languges where you can select the
languages you want to have. When everything is deselected, the list will
simply fallback to the preconfigured element (for example the language
configured before)

The event is annoncing that there was a change to the selection. The
event is allowed to be defered, it will be emitted once for a range of
selection elements that happened during one loop iteration. This is
usefull if you are interested in a general selection where you want to
know that we changed from a specific set of selected element to another
set of elements, without monitoring every selectable in the widget.

ref T8057

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9662
2019-08-26 14:42:50 +02:00
..
README Efl.Ui.Format revamp 2019-07-04 19:38:20 +02:00
efl_test_clickable.c fix warning 2019-08-01 11:41:30 +02:00
efl_test_container.c introduce group item 2019-08-21 07:50:46 +02:00
efl_test_content.c efl_ui: rename list empty item to list placeholder item. 2019-05-30 15:40:31 +09:00
efl_test_format.c Evil: remove pwd code in Evil and fix compilation failures after the removal 2019-07-28 09:27:27 +01:00
efl_test_gfx_arrangement.c efl_pack: split algin and padding property 2019-04-26 12:06:02 +02:00
efl_test_gfx_view.c efl_ui_animation_view: introduce a new widget for controlling vector animation. 2019-08-21 17:40:15 +09:00
efl_test_multi_selectable.c efl_ui_single_selectable: add properties and events 2019-08-26 14:42:50 +02:00
efl_test_pack.c introduce group item 2019-08-21 07:50:46 +02:00
efl_test_pack_linear.c introduce group item 2019-08-21 07:50:46 +02:00
efl_test_range_display.c efl_ui_spec: add test suite for range_display events 2019-07-31 10:18:20 +02:00
efl_test_range_interactive.c efl_ui_spin: move the step implementation to spin_button 2019-08-03 20:40:11 +02:00
efl_test_selectable.c efl_ui_selectable: add spec test suite for this 2019-08-08 09:12:46 -04:00
efl_test_single_selectable.c efl_ui_single_selectable: add properties and events 2019-08-26 14:42:50 +02:00
efl_test_ui_view.c elementary: add a test for Efl.Ui.View interface. 2019-07-17 21:58:01 +02:00
efl_ui_spec_suite.c efl_ui_item: migrate to Efl.Ui.Clickable 2019-07-29 16:32:05 +02:00
efl_ui_spec_suite.h efl_ui_animation_view: introduce a new widget for controlling vector animation. 2019-08-21 17:40:15 +09:00
generator.py efl_ui_spec_suite: this is not python2 2019-07-12 15:10:37 +02:00
meson.build efl_ui_animation_view: introduce a new widget for controlling vector animation. 2019-08-21 17:40:15 +09:00

README

== What is this spec test suite for ? ==

The spec test suite tests code purely against interfaces. There is no specific widget code in the tests; only interface calls are tested.
This is useful for testing the same interface on different implementations.

== Test metadata ==

The test framework is driven by some metadata found at the top of every test file.
There is a C comment at the top of every test file that starts with "spec-meta-start", followed by a json snippet. For instance:
/* spec-meta-start
   {"test-interface":"Efl.Pack_Linear",
    "test-widgets": ["Efl.Ui.Box", "Efl.Ui.Grid"],
    "custom-mapping" : {
       "Efl.Ui.Grid" : "EFL_UI_GRID_DEFAULT_ITEM_CLASS"
    }
   }
   spec-meta-end */

The "test-interface" key specifies the interface being tested.
The "test-widgets" key specifies the widgets where this interface will be tested.
"custom-mapping" is an optional key. Some interface methods might require that an object of a specific type is passed as parameter. With "custom-mapping" you can specify the types of these objects for each widget. The above example instructs the test framework to inject objects of type EFL_UI_GRID_DEFAULT_ITEM_CLASS when testing methods of the Efl.Ui.Grid widget that require an object.

== Adding a widget to a test ==

Just add your widget name to the "test-widgets" array and recompile. Next run of the spec test suite will check if your widget follows the spec of this interface.

== Adding a new test ==

To add a new test you need to create the .c file and include the metadata comment at the top.
Remember to add the new .c file to the meson.build file.