You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by kw...@apache.org on 2020/12/08 14:00:55 UTC
[sling-org-apache-sling-scripting-sightly-testing] branch
feature/support-predefined-date-formats created (now 85c020d)
This is an automated email from the ASF dual-hosted git repository.
kwin pushed a change to branch feature/support-predefined-date-formats
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-sightly-testing.git.
at 85c020d SLING-9983 add IT for predefined date format style
This branch includes the following new commits:
new 85c020d SLING-9983 add IT for predefined date format style
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[sling-org-apache-sling-scripting-sightly-testing] 01/01:
SLING-9983 add IT for predefined date format style
Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
kwin pushed a commit to branch feature/support-predefined-date-formats
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-scripting-sightly-testing.git
commit 85c020ded3264c5a6b6610215b5ce2f72c7fe320
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Tue Dec 8 15:00:15 2020 +0100
SLING-9983 add IT for predefined date format style
---
.../sling/scripting/sightly/it/SlingSpecificsSightlyIT.java | 11 +++++++++++
1 file changed, 11 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 2eab0ce..fd687c6 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
@@ -61,6 +61,7 @@ public class SlingSpecificsSightlyIT {
private static final String SLING_CRLF_NOPKG = SLING_CRLF + ".nopkg.html";
private static final String SLING_CRLF_PKG = SLING_CRLF + ".pkg.html";
private static final String SLING_CRLF_WRONGPKG = SLING_CRLF + ".wrongpkg.html";
+ private static final String SLING_FORMAT = "/content/sightly/format.html";
private static final String SLING_SCRIPT_UPDATE = "/content/sightly/update.html";
private static final String SLING_REQUEST_ATTRIBUTES = "/content/sightly/requestattributes.html";
private static final String SLING_REQUEST_ATTRIBUTES_INCLUDE = "/content/sightly/requestattributes.include.html";
@@ -380,6 +381,16 @@ public class SlingSpecificsSightlyIT {
}
@Test
+ public void testFormatWithPredefinedStyles() {
+ String url = launchpadURL + SLING_FORMAT;
+ String pageContent = client.getStringContent(url, 200);
+ assertEquals("01.12.1918", HTMLExtractor.innerHTML(url, pageContent, "#format-date-1"));
+ assertEquals("01.12.18", HTMLExtractor.innerHTML(url, pageContent, "#format-date-2"));
+ assertEquals("01.12.18", HTMLExtractor.innerHTML(url, pageContent, "#format-date-3"));
+ assertEquals("Sonntag, 1. Dezember 1918", HTMLExtractor.innerHTML(url, pageContent, "#format-date-4"));
+ }
+
+ @Test
public void testXSSAttributeEscaping() {
String url = launchpadURL + TCK_XSS;
String pageContent = client.getStringContent(url, 200);