Michael Kitanovski created SLING-10868:
------------------------------------------

             Summary: Search pattern in getSlingLocation method only works if 
id is the last attribute
                 Key: SLING-10868
                 URL: https://issues.apache.org/jira/browse/SLING-10868
             Project: Sling
          Issue Type: Bug
          Components: Apache Sling Testing Clients
            Reporter: Michael Kitanovski


The method getSlingLocation in class SlingHttpResponse uses a search pattern 
which only works if the "id" attribute is the last one. We have implemented a 
link rewriter transformer in our project which adds a class="internal" to each 
internal link. In our case now the class attribute is the last one and the 
method  extractFromHTMLResponse(String searchPattern) will return null because 
it won't find the the searched string in the content.

 

[https://github.com/apache/sling-org-apache-sling-testing-clients/blob/c8a6d4bd9c3e92a2c00920d86f3d27d58478050e/src/main/java/org/apache/sling/testing/clients/SlingHttpResponse.java#L201]

 

The same issue exists for other methods like 

- getSlingParentLocation()

- getSlingReferer()

 

It seems AEMaaCs uses the aem-test-samples 
([https://github.com/adobe/aem-test-samples)] for integration tests during the 
production pipeline run. One of the tests is using the getSlingLocation method 
which causes termination of the deployment process.

 

https://github.com/adobe/aem-test-samples/blob/4f7653db344c3f31f4a1a6440bf0f01db75ea382/smoke/src/main/java/com/adobe/cq/cloud/testing/it/smoke/CreatePageAsAuthorUserIT.java#L78

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to