efl/src/tests/elementary/spec
Marcel Hollerbach 577b82dad6 Introduce Efl.Ui.Item_Container
this is a new widget which aims to replace Efl.Ui.Grid / Efl.Ui.List.
The widget is split up in a widget and a interface for item placement.

Efl_Ui_Item_Position_Manager: The interface contains API which is used
by the Item_Container to place the items, there is also a set of common
tests which tests for the casual tripping wires, and ensures that the
events are emitted in the correct moments (the later part still can be
improved)

Efl_Ui_Item_Container: The widget itself, it contains the API for the
enduser to add Items to the widget, it handles the different modes for
selection type and emits the events for selection changes. The pack API
is conform with the spec unit test. An additional set of tests is
defined which should be able to be run on every widget with a specific
position_manager beeing set.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9285
2019-07-24 10:38:22 -07:00
..
README Efl.Ui.Format revamp 2019-07-04 19:38:20 +02:00
efl_test_clickable.c efl_ui_frame: migrate to efl.ui.clickable 2019-05-15 09:09:04 -04:00
efl_test_container.c elm: here comes a new testsuite 2019-04-17 15:21:11 +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 Efl.Ui.Format revamp 2019-07-04 19:38:20 +02:00
efl_test_gfx_arrangement.c efl_pack: split algin and padding property 2019-04-26 12:06:02 +02:00
efl_test_pack.c ui.relative_layout: implement Efl.Pack 2019-05-03 11:53:54 +02:00
efl_test_pack_linear.c Introduce Efl.Ui.Item_Container 2019-07-24 10:38:22 -07:00
efl_test_range_display.c efl_ui_spec_suite: introduce two new test suites 2019-07-08 19:56:33 +02:00
efl_test_range_interactive.c efl_ui_spec_suite: introduce two new test suites 2019-07-08 19:56:33 +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 Introduce Efl.Ui.Item_Container 2019-07-24 10:38:22 -07:00
efl_ui_spec_suite.h Introduce Efl.Ui.Item_Container 2019-07-24 10:38:22 -07:00
generator.py efl_ui_spec_suite: this is not python2 2019-07-12 15:10:37 +02:00
meson.build Introduce Efl.Ui.Item_Container 2019-07-24 10:38:22 -07:00
test_efl_ui_item_container_list.eo Introduce Efl.Ui.Item_Container 2019-07-24 10:38:22 -07: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.