Show query rewrite of VC as title attribute
Change-Id: I6946bf1f9a2f8e7de95d61788c558ce5d5d39446
diff --git a/dev/js/spec/vcSpec.js b/dev/js/spec/vcSpec.js
index 0c86d85..482d384 100644
--- a/dev/js/spec/vcSpec.js
+++ b/dev/js/spec/vcSpec.js
@@ -1986,6 +1986,36 @@
expect(doc.element().classList.contains('rewritten')).toBeTruthy();
});
+ it('should be described in a title attribute', function () {
+
+ doc = docClass.create(
+ undefined,
+ {
+ "@type":"koral:doc",
+ "key":"Titel",
+ "value":"Baum",
+ "match":"match:eq",
+ "rewrites" : [
+ {
+ "@type" : "koral:rewrite",
+ "operation" : "operation:modification",
+ "src" : "querySerializer",
+ "scope" : "tree"
+ },
+ {
+ "@type" : "koral:rewrite",
+ "operation" : "operation:injection",
+ "src" : "me"
+ }
+ ]
+ });
+
+ expect(doc.element().classList.contains('doc')).toBeTruthy();
+ expect(doc.element().classList.contains('rewritten')).toBeTruthy();
+ expect(doc.element().lastChild.getAttribute("title")).toEqual("querySerializer: tree (modification)\nme (injection)");
+ });
+
+
xit('should be deserialized by docGroups', function () {
var docGroup = docGroupClass.create(
undefined,