You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2018/09/04 15:48:50 UTC

[sling-whiteboard] branch master updated: Demonstrate Scenario Outline

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

bdelacretaz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-whiteboard.git


The following commit(s) were added to refs/heads/master by this push:
     new 800cff5  Demonstrate Scenario Outline
800cff5 is described below

commit 800cff5d7c5a23e604f7194bd800c51a2058471d
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Tue Sep 4 17:48:40 2018 +0200

    Demonstrate Scenario Outline
---
 .../test/java/sling/setup/initialContent.feature   | 39 ++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/karate-http-testing/src/test/java/sling/setup/initialContent.feature b/karate-http-testing/src/test/java/sling/setup/initialContent.feature
new file mode 100644
index 0000000..614d3e0
--- /dev/null
+++ b/karate-http-testing/src/test/java/sling/setup/initialContent.feature
@@ -0,0 +1,39 @@
+# ------------------------------------------------------------------------
+Feature: Test the Sling initial content and demonstrate Scenario Outline
+# ------------------------------------------------------------------------
+
+Background:
+* url baseURL
+
+# Use admin credentials for all requests
+* configure headers = call read('classpath:util/basic-auth-header.js')
+
+# Sling instance ready?
+* def unused = call read('classpath:util/sling-ready.feature')
+
+# ------------------------------------------------------------------------
+Scenario Outline: Validate Initial Content
+# ------------------------------------------------------------------------
+
+Given path '<contentPath>' + '.json'
+When method GET
+Then status 200
+And match $.<jsonPath> == "<value>"
+
+# ------------------------------------------------------------------------
+# Data values used by the Scenario outline
+# ------------------------------------------------------------------------
+Examples:
+  | contentPath | jsonPath | value |
+
+  # Sling starter content
+  | starter/css | jcr:primaryType | sling:Folder |
+  | starter/css/bundle.css | jcr:createdBy | admin |
+  | starter/index.html/jcr:content| jcr:mimeType| text/html |
+
+  # OSGi console
+  | system/console/bundles | data[0].symbolicName | org.apache.felix.framework |
+
+  # Empty path means root
+  | | sling:target | /starter/index.html |
+  | | sling:resourceType | sling:redirect |
\ No newline at end of file