sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [sling-org-apache-sling-scripting-sightly-testing] 01/01: SLING-7589 - HTL doesn't correctly handle synthetic resource inclusions
Date Tue, 17 Apr 2018 15:05:30 GMT
This is an automated email from the ASF dual-hosted git repository.

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

commit 86762814992673fc3907399cc6b12638886bc654
Author: Radu Cotescu <radu@apache.org>
AuthorDate: Tue Apr 17 17:04:45 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.

Mime
View raw message