Skip to content

Commit 878d87b

Browse files
committed
DHFPROD-3448: correct tests so the casting works properly
1 parent 0526f70 commit 878d87b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

marklogic-data-hub/src/test/resources/e2e-test/sjs-flow/es-content-harmonize-xml.sjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ function extractInstanceE2eentity(source) {
6161
// the original source documents
6262
let attachments = source;
6363

64-
let id = xs.string(source.xpath('id/text()'));
65-
let name = xs.string(source.xpath('name/text()'));
66-
let salary = xs.decimal(source.xpath('salary/text()'));
64+
let id = xs.string(fn.head(source.xpath('id/string()')));
65+
let name = xs.string(fn.head(source.xpath('name/string()')));
66+
let salary = xs.decimal(fn.head(source.xpath('salary/string()')));
6767

6868
// return the instance object
6969
return {

marklogic-data-hub/src/test/resources/e2e-test/sjs-flow/es-content-input-xml.sjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ function extractInstanceE2eentity(source) {
5858
// the original source documents
5959
let attachments = source;
6060

61-
let id = xs.string(source.xpath('id/text()'));
62-
let name = xs.string(source.xpath('name/text()'));
63-
let salary = xs.decimal(source.xpath('salary/text()'));
61+
let id = xs.string(fn.head(source.xpath('id/string()')));
62+
let name = xs.string(fn.head(source.xpath('name/string()')));
63+
let salary = xs.decimal(fn.head(source.xpath('salary/string()')));
6464

6565
// return the instance object
6666
return {

0 commit comments

Comments
 (0)