Mark notinindex-fields
Change-Id: I86e85b38c1512edbe2d821b8718fb4bc52d4ae16
diff --git a/dev/js/spec/matchSpec.js b/dev/js/spec/matchSpec.js
index 20fecbd..43b9ac6 100644
--- a/dev/js/spec/matchSpec.js
+++ b/dev/js/spec/matchSpec.js
@@ -106,6 +106,13 @@
"type": "type:attachement",
"value": "data:,This is a reference"
},
+ {
+ "@type": "koral:field",
+ "key": "zz-notinindex",
+ "type": "type:text",
+ "comment": "notinindex",
+ "value": "Stored but not indexed"
+ },
];
@@ -1095,6 +1102,16 @@
expect(mel.children[6].children[0].firstChild.nodeValue).toEqual('z-reference');
expect(mel.children[6].children[1].firstChild.nodeValue).toEqual('This is a reference');
});
+
+ it('should mark metadata not in index', function () {
+ let notInIndexField = Array.from(mel.children).find(function (field) {
+ return field.children[0].firstChild.nodeValue === 'zz-notinindex';
+ });
+
+ expect(notInIndexField).toBeTruthy();
+ expect(notInIndexField.children[1].classList.contains('notinindex')).toBeTruthy();
+ expect(notInIndexField.children[1].firstChild.nodeValue).toEqual('Stored but not indexed');
+ });