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 e22c8b0 SLING-9580 - Make the dependency resolution more
resource-type centric
e22c8b0 is described below
commit e22c8b0adc957aa7062dcfe17c925c9b27df23e1
Author: Radu Cotescu <[email protected]>
AuthorDate: Thu Jul 30 15:58:47 2020 +0200
SLING-9580 - Make the dependency resolution more resource-type centric
* modified test for sibling dependencies; a script should first be resolved
relative to the resource type that triggered the execution and only if one
was not found we should look for a script relative to the calling script
---
.../apache/sling/scripting/sightly/it/SlingSpecificsSightlyIT.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
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 3788cad..861f488 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
@@ -205,7 +205,12 @@ public class SlingSpecificsSightlyIT {
public void testJSUseAPISiblingDependencies() {
String url = launchpadURL + SLING_JS_DEPENDENCY_RESOLUTION;
String pageContent = client.getStringContent(url, 200);
- assertEquals("/apps/sightly/scripts/siblingdeps/dependency.js",
HTMLExtractor.innerHTML(url, pageContent, "#js-rep-res"));
+ /*
+ SLING-9580 - Make the dependency resolution more resource-type
centric
+ * this test didn't really make sense; a script should first be
resolved relative to the resource type that triggered the
+ execution and only if one was not found we should look for a
script relative to the calling script
+ */
+
assertEquals("/apps/sightly/scripts/siblingdeps/component/dependency.js",
HTMLExtractor.innerHTML(url, pageContent, "#js-rep-res"));
}
@Test