Uploaded image for project: 'Ibexa IBX'
  1. Ibexa IBX
  2. IBX-5080

[Behat] Create a step dedicated to directly creating and editing Content

Details

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • 4.5
    • QA

    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)

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              marek.nocon@ibexa.co Marek NocoĊ„
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: