You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ra...@apache.org on 2018/04/24 07:46:21 UTC

[sling-org-apache-sling-scripting-sightly-testing] branch master updated: SLING-7589 - HTL doesn't correctly handle synthetic resource inclusions

This is an automated email from the ASF dual-hosted git repository.

radu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-sightly-testing.git


The following commit(s) were added to refs/heads/master by this push:
     new ba328da  SLING-7589 - HTL doesn't correctly handle synthetic resource inclusions
ba328da is described below

commit ba328da0dabd1fae830bd504d7f9a0fbbeefe657
Author: Radu Cotescu <17...@users.noreply.github.com>
AuthorDate: Tue Apr 24 09:46:19 2018 +0200

    SLING-7589 - HTL doesn't correctly handle synthetic resource inclusions
    
    * added test
---
 .../sling/scripting/sightly/it/SlingSpecificsSightlyIT.java       | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/test/java/org/apache/sling/scripting/sightly/it/SlingSpecificsSightlyIT.java b/src/test/java/org/apache/sling/scripting/sightly/it/SlingSpecificsSightlyIT.java
index f7d49fd..979f2ef 100644
--- a/src/test/java/org/apache/sling/scripting/sightly/it/SlingSpecificsSightlyIT.java
+++ b/src/test/java/org/apache/sling/scripting/sightly/it/SlingSpecificsSightlyIT.java
@@ -64,6 +64,7 @@ public class SlingSpecificsSightlyIT {
     private static final String SLING_I18N = "/sightly/i18n";
     private static final String TCK_XSS = "/sightlytck/exprlang/xss.html";
     private static final String WHITESPACE = "/sightly/whitespace.html";
+    private static final String SYNTHETIC_RESOURCE = "/sightly/synthetic-resource.html";
 
     @BeforeClass
     public static void init() {
@@ -358,6 +359,13 @@ public class SlingSpecificsSightlyIT {
         assertEquals("true", HTMLExtractor.innerHTML(url, pageContent, "#newline"));
     }
 
+    @Test
+    public void testSyntheticResourceResolution() {
+        String url = launchpadURL + SYNTHETIC_RESOURCE;
+        String pageContent = client.getStringContent(url, 200);
+        assertEquals("It works!", HTMLExtractor.innerHTML(url, pageContent, "#synthetic-resource-selector"));
+    }
+
     private void restartSightlyEngineBundle() throws InterruptedException, IOException {
         HttpClient httpClient = HttpClientBuilder.create().build();
         HttpPost post = new HttpPost(launchpadURL + "/system/console/bundles/org.apache.sling.scripting.sightly");

-- 
To stop receiving notification emails like this one, please contact
radu@apache.org.