Closed Gustry closed 3 years ago
Add a test to check actions stored in QML.
This test is checking :
The only thing not testable is the type of parameter (clicked X, clicked Y, strings, attributes etc).
The python code of the action itself is not covered by this test. This was already possible before, it just needs a test calling the Python function.
This code can be copy/pasted in another project.
For all actions which are not "edition only", we should use Python to create them. For instance in QuickOSM:
actions = layer.actions() title = tr('OpenStreetMap Browser') osm_browser = QgsAction( QgsAction.OpenUrl, title, 'http://www.openstreetmap.org/browse/[% "osm_type" %]/[% "osm_id" %]', '', False, title, ACTIONS_VISIBILITY, '' ) actions.addAction(osm_browser)
CC @drillinP @rldhont @mdouchin
Add a test to check actions stored in QML.
This test is checking :
The only thing not testable is the type of parameter (clicked X, clicked Y, strings, attributes etc).
The python code of the action itself is not covered by this test. This was already possible before, it just needs a test calling the Python function.
This code can be copy/pasted in another project.
For all actions which are not "edition only", we should use Python to create them. For instance in QuickOSM:
CC @drillinP @rldhont @mdouchin