Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-151168

Automation Test Creation | LPS-148154 Manage StructuredContent Asset priority through the headless APIs

Details

    • 1
    • S05E02 - Path of Exile, S05E03 - Tibia, S05E04 - Half Life, S05E05 - Tetris

    Description

      Create test automation to validate the critical test scenarios/cases of the related story.

      The focus of this task is to implement the CRITICAL and MAJOR tests of the parent epic, but if you believe that can and have time to implement the lower priority tests please, create one more subtask to it, and go ahead! 

       Before starting with the first test create a directory HeadlessDeliveryAPI under liferay-portal/portal-web/test/functional/com/liferay/portalweb/tests/enduser/headless/ and create a testcase file HeadlessDeliveryStructuredContent.testcase inside of it.

      • Send to liferay-frontend and request QA reviewer
      • Close subtask when merged

       
      Test Scenarios:

      Requirement Test Case Covered by frontend/backend unit test? (Yes/No) Test Priority (business impact)
       HeadlessDeliveryStructuredContent#StructuredContentContainsPriorityField Given web content is created with default priority
      When with GET request I filter web content by the field priority with "/v1.0/site/{siteId}/structured-contents"
      Then you can see the web content filtered by the default in the body response
         4-major
       HeadlessDeliveryStructuredContent#StructuredContentContainsUpdatedPriorityValueFilteredByEqualTo Given three web content is created with default priority
      Then edit three web content with different priorities (eg: 1.2, 1.3, 1.4)
      When with GET request I filter priority eq 1.3 web content by the field priority with "/v1.0/site/{siteId}/structured-contents"
      Then you can see the web content filtered by the priority 1.3 in the body response
         4-major
        HeadlessDeliveryStructuredContent#CanSortDescendingStructuredContentsByPriority Given three web content is created with different priorities (eg: 1.2, 1.3, 1.4)
      When with GET request I sort priority:desc web content by the field priority with "/v1.0/site/{siteId}/structured-contents"
      Then you can see the web content sorted by the descending priority in the body response
         5-critical
      HeadlessDeliveryStructuredContent#StructuredContentIsCreatedWithPriorityField  Given a content structure with a content-field of dataType "string" and label "content" and name "content" created in the portal
      And Given that web content is created with default priority
      When with POST request with "/v1.0/site/{siteId}/structured-contents"
      Then you can see the response body includes the set default priority value
         4-major
       HeadlessDeliveryStructuredContent#CanModifyStructuredContentPriorityValue Given a content structure with a content-field of dataType "string" and label "content" and name "content" created in the portal
      And Given that web content is created with default priority
      When with PUT request with "/v1.0/structured-contents/{structuredContentId}" priority is modified to 3.0
      Then you can see the response body includes the updated priority value
         5-critical
       HeadlessDeliveryStructuredContent#CanCreateStructuredContentWithDefinedPriorityValue Given a content structure with a content-field of dataType "string" and label "content" and name "content" created in the portal
      And Given that web content is created with non-default priority (eg: 1.2, 1.3, 1.4)
      When with GET request with "/v1.0/site/{siteId}/structured-contents"
      Then you can see the response body includes the set priority value
         5-critical 

      Attachments

        Issue Links

          Activity

            People

              kevin.wan Kevin Wan
              magdalena.jedraszak Magdalena Jedraszak
              Kiyoshi Lee Kiyoshi Lee
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Packages

                  Version Package