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

Automation Test Creation | LPS-148559 Manage StructuredContent Asset priority through the headless admin content APIs

    Details

    • Type: Testing
    • Status: In Progress
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Headless Delivery API
    • Labels:
    • Story Points:
      1
    • Sprint:
      S05E04 - Half Life, S05E06 - Donkey Kong, S05E07 - Axie Infinity

      Description

      Analyze integration tests created for the functionality in order to avoid redundancy when automating manual test cases. Create test automation to validate the critical test scenarios/cases of the related story for the cases that are not covered by integration tests.

      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! 

      • Create a subtask for each test case
      • Assign a subtask to yourself
      • Send to liferay-frontend and request QA reviewer
      • Close subtask when merged

      Test Scenarios:

      Requirement Test Case Covered by integration test? (Yes/No) Test Priority (business impact) Comments
      StructuredContentDraftContainsSetPriorityValue Given a content structure with a content-field of dataType "string" and label "content" and name "content" created in the portal
      When I create a structuredContent draft with Headless Admin Content POST "/v1.0/sites/{siteId}/structured-contents/draft" with a priority field set (as in the json example attached)
      Then the response body includes the set priority
         5-critical  
      StructuredContentDraftByVersionContainsSetPriority Given a structuredContent draft with Headless Admin Content POST "/v1.0/sites/{siteId}/structured-contents/draft" with a priority field set (as in the json example attached) is created
      When invoking /v1.0/structured-contents/{structuredContentId}/by-version/{version}
      Then the response body includes the set priority
         5-critical  
      StructuredContentDraftContainsModifiedPriorityValue Given a content structure with a content-field of dataType "string" and label "content" and name "content" created in the portal
      And Given with Headless Admin Content POST "/v1.0/sites/{siteId}/structured-contents/draft" a structured content draft "content1" with a priority 1.0 set is created
      When with Headless Delivery PUT "/v1.0/structured-contents/{structuredContentId}" a structured content draft "content1" priority is modified to 3.0
      And When with Headless Admin Content GET "/v1.0/sites/{siteId}/structured-contents" and filter set to "priority eq 3.0"
      Then I should see in response "content1" with the updated priority value
        5-critical  
      StructuredContentDraftContainsPriorityField Given a content structure with a content-field of dataType "string" and label "content" and name "content" created in the portal
      When I create a structuredContent draft with Headless Admin Content POST "/v1.0/sites/{siteId}/structured-contents/draft" without setting the priority
      Then the response body includes the default priority field
         4-major   
      Background to all the tests listed below Given a content structure with a content-field of dataType "string" and label "content" and name "content" created in the portal
      And Given with Headless Admin Content POST "/v1.0/sites/ {siteId}/structured-contents/draft" a structured content draft "content1" with a priority 1.0 set is created
      And Given with Headless Admin Content POST "/v1.0/sites/{siteId}
      /structured-contents/draft" a structured content draft "content2" with a priority 1.0 set is created
      And Given with Headless Admin Content POST "/v1.0/sites/ {siteId}/structured-contents/draft" a structured content draft "content3" with a priority 2.99 set is created
      And Given with Headless Admin Content POST "/v1.0/sites/{siteId}
      /structured-contents/draft" a structured content draft "content4" with a priority 0.99 set is created
           
       CanFilterEqualToPriorityValuesSortedByPriorityAscendingByDefault When with Headless Admin Content GET "/v1.0/sites/{siteId}/structured-contents" and filter set to "priority eq 1.0" and sort set to "priority"
      Then I should see in response "content1" and "content2"
         4-major  
       CanFilterNotEqualToPriorityValuesSortedAscending When with Headless Admin Content GET "/v1.0/sites/{siteId}/structured-contents" and filter set to "priority ne 1.0" and sort set to "priority:asc"
      Then I should see in response "content3" and "content4" sorted by priority in ascending order
         4-major  
       CanFilterGreaterThanPriorityValuesSortedDescending When with Headless Admin Content GET "/v1.0/sites/{siteId}/structured-contents" and filter set to "priority gt 0.99" and sort set to "priority:desc"
      Then I should see in response "content1", "content2" and "content3" sorted by priority in descending order
         4-major  
      CanFilterGreaterEqualPriorityValues  When with Headless Admin Content GET "/v1.0/sites/ {siteId}/structured-contents" and filter set to "priority ge 0.99"
      Then I should see in response "content1", "content2", "content3" and "content4"
         4-major  
      CanInvokeAllStructuredContentCreated  When invoking Headless Admin Content GET "/v1.0/structured-contents/ {structuredContentId}/by-version/1"
      Then I should see in response "content1", "content2", "content3" and "content4" with a priority field set
        4-major   

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              support-qa Support QA
              Reporter:
              magdalena.jedraszak Magdalena Jedraszak
              Recent user:
              Pier Nicolò Pinna
              Participants of an Issue:
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:

                  Packages

                  Version Package