Description
To speed up tests we should create a step that allows us to open the new Content editing view of a Content Item directly, instead of going through the Content View -> Content Type picker route.
Then, instead of:
And I am logged as admin And I'm on Content view Page for MapFieldsContainer When I start creating a new content "<fieldName> CT" And I set content fields | label | <label1> | <label2> | <label3> | | Field | <value1> | <value2> | <value3> | | Name | <fieldName> | | |
https://github.com/ibexa/admin-ui/blob/main/features/standard/fields/map.feature#L17-L22
or
Given I am logged as admin And I'm on Content view Page for "MapFieldsContainer/<oldContentItemName>" When I click on the edit action bar button "Edit" And I set content fields | label | <label1> | <label2> | <label3> | | Field | <value1> | <value2> | <value3> |
https://github.com/ibexa/admin-ui/blob/main/features/standard/fields/map.feature#L37-L42
we should be able to write:
And I am logged as admin And I'm creating a new "<fieldName> CT" Content Item under MapFieldsContainer And I set content fields | label | <label1> | <label2> | <label3> | | Field | <value1> | <value2> | <value3> | | Name | <fieldName> | | |
and
Given I am logged as admin
And I'm editing the "MapFieldsContainer/<oldContentItemName>" Content Item
And I set content fields
| label | <label1> | <label2> | <label3> |
| Field | <value1> | <value2> | <value3> |
Technical details:
Change the getRoute method (https://github.com/ibexa/admin-ui/blob/main/src/lib/Behat/Page/ContentUpdateItemPage.php#L112-L115) to use one of the two routes, based on the expectedParametersSet (if contentId is set then use ibexa.content.draft.edit, otherwise use ibexa.content.create.proxy)