@@ -1575,11 +1575,11 @@ describe('api: /forms/:id/submissions', () => {
15751575 . then ( ( result ) => {
15761576 result . filenames . should . containDeep ( [ 'selectMultiple.csv' ] ) ;
15771577 const lines = result [ 'selectMultiple.csv' ] . split ( '\n' ) ;
1578- lines [ 0 ] . should . equal ( 'SubmissionDate,q1,q1/a,q1/b,g1-q2,g1-q2/m,g1-q2/x,g1-q2/y,g1-q2/z,KEY,SubmitterID,SubmitterName,AttachmentsPresent,AttachmentsExpected,Status,ReviewState,DeviceID,Edits,FormVersion' ) ;
1578+ lines [ 0 ] . should . equal ( 'SubmissionDate,meta-instanceID, q1,q1/a,q1/b,g1-q2,g1-q2/m,g1-q2/x,g1-q2/y,g1-q2/z,KEY,SubmitterID,SubmitterName,AttachmentsPresent,AttachmentsExpected,Status,ReviewState,DeviceID,Edits,FormVersion' ) ;
15791579 lines [ 1 ] . slice ( 'yyyy-mm-ddThh:mm:ss._msZ' . length )
1580- . should . equal ( ',b,0,1,m x,1,1,0,0,two,5,Alice,0,0,,,,0,' ) ;
1580+ . should . equal ( ',two, b,0,1,m x,1,1,0,0,two,5,Alice,0,0,,,,0,' ) ;
15811581 lines [ 2 ] . slice ( 'yyyy-mm-ddThh:mm:ss._msZ' . length )
1582- . should . equal ( ',a b,1,1,x y z,0,1,1,1,one,5,Alice,0,0,,,,0,' ) ;
1582+ . should . equal ( ',one, a b,1,1,x y z,0,1,1,1,one,5,Alice,0,0,,,,0,' ) ;
15831583 } ) ) ) ) ) ;
15841584
15851585 it ( 'should omit multiples it does not know about' , testService ( ( service ) =>
@@ -1597,11 +1597,11 @@ describe('api: /forms/:id/submissions', () => {
15971597 . then ( ( result ) => {
15981598 result . filenames . should . containDeep ( [ 'selectMultiple.csv' ] ) ;
15991599 const lines = result [ 'selectMultiple.csv' ] . split ( '\n' ) ;
1600- lines [ 0 ] . should . equal ( 'SubmissionDate,q1,g1-q2,KEY,SubmitterID,SubmitterName,AttachmentsPresent,AttachmentsExpected,Status,ReviewState,DeviceID,Edits,FormVersion' ) ;
1600+ lines [ 0 ] . should . equal ( 'SubmissionDate,meta-instanceID, q1,g1-q2,KEY,SubmitterID,SubmitterName,AttachmentsPresent,AttachmentsExpected,Status,ReviewState,DeviceID,Edits,FormVersion' ) ;
16011601 lines [ 1 ] . slice ( 'yyyy-mm-ddThh:mm:ss._msZ' . length )
1602- . should . equal ( ',b,m x,two,5,Alice,0,0,,,,0,' ) ;
1602+ . should . equal ( ',two, b,m x,two,5,Alice,0,0,,,,0,' ) ;
16031603 lines [ 2 ] . slice ( 'yyyy-mm-ddThh:mm:ss._msZ' . length )
1604- . should . equal ( ',a b,x y z,one,5,Alice,0,0,,,,0,' ) ;
1604+ . should . equal ( ',one, a b,x y z,one,5,Alice,0,0,,,,0,' ) ;
16051605 } ) ) ) ) ) ;
16061606
16071607 it ( 'should split select multiples and filter given both options' , testService ( ( service , container ) =>
@@ -1741,11 +1741,11 @@ describe('api: /forms/:id/submissions', () => {
17411741 . then ( ( result ) => {
17421742 result . filenames . should . containDeep ( [ 'selectMultiple.csv' ] ) ;
17431743 const lines = result [ 'selectMultiple.csv' ] . split ( '\n' ) ;
1744- lines [ 0 ] . should . equal ( 'SubmissionDate,q1,q1/a,q1/b,q2,q2/m,q2/x,q2/y,q2/z,KEY,SubmitterID,SubmitterName,AttachmentsPresent,AttachmentsExpected,Status,ReviewState,DeviceID,Edits,FormVersion' ) ;
1744+ lines [ 0 ] . should . equal ( 'SubmissionDate,instanceID, q1,q1/a,q1/b,q2,q2/m,q2/x,q2/y,q2/z,KEY,SubmitterID,SubmitterName,AttachmentsPresent,AttachmentsExpected,Status,ReviewState,DeviceID,Edits,FormVersion' ) ;
17451745 lines [ 1 ] . slice ( 'yyyy-mm-ddThh:mm:ss._msZ' . length )
1746- . should . equal ( ',b,0,1,m x,1,1,0,0,two,5,Alice,0,0,,,,0,' ) ;
1746+ . should . equal ( ',two, b,0,1,m x,1,1,0,0,two,5,Alice,0,0,,,,0,' ) ;
17471747 lines [ 2 ] . slice ( 'yyyy-mm-ddThh:mm:ss._msZ' . length )
1748- . should . equal ( ',a b,1,1,x y z,0,1,1,1,one,5,Alice,0,0,,,,0,' ) ;
1748+ . should . equal ( ',one, a b,1,1,x y z,0,1,1,1,one,5,Alice,0,0,,,,0,' ) ;
17491749 } ) ) ) ) ) ;
17501750
17511751 it ( 'should properly count present attachments' , testService ( ( service ) =>
@@ -2186,11 +2186,11 @@ one,h,/data/h,2000-01-01T00:06,2000-01-01T00:07,-5,-6,,ee,ff
21862186 // eslint-disable-next-line no-multi-spaces
21872187 . then ( ( { text } ) => {
21882188 const lines = text . split ( '\n' ) ;
2189- lines [ 0 ] . should . equal ( 'SubmissionDate,q1,q1/a,q1/b,g1-q2,g1-q2/m,g1-q2/x,g1-q2/y,g1-q2/z,KEY,SubmitterID,SubmitterName,AttachmentsPresent,AttachmentsExpected,Status,ReviewState,DeviceID,Edits,FormVersion' ) ;
2189+ lines [ 0 ] . should . equal ( 'SubmissionDate,meta-instanceID, q1,q1/a,q1/b,g1-q2,g1-q2/m,g1-q2/x,g1-q2/y,g1-q2/z,KEY,SubmitterID,SubmitterName,AttachmentsPresent,AttachmentsExpected,Status,ReviewState,DeviceID,Edits,FormVersion' ) ;
21902190 lines [ 1 ] . slice ( 'yyyy-mm-ddThh:mm:ss._msZ' . length )
2191- . should . equal ( ',b,0,1,m x,1,1,0,0,two,5,Alice,0,0,,,,0,' ) ;
2191+ . should . equal ( ',two, b,0,1,m x,1,1,0,0,two,5,Alice,0,0,,,,0,' ) ;
21922192 lines [ 2 ] . slice ( 'yyyy-mm-ddThh:mm:ss._msZ' . length )
2193- . should . equal ( ',a b,1,1,x y z,0,1,1,1,one,5,Alice,0,0,,,,0,' ) ;
2193+ . should . equal ( ',one, a b,1,1,x y z,0,1,1,1,one,5,Alice,0,0,,,,0,' ) ;
21942194 } ) ) ) ) ) ;
21952195
21962196 it ( 'should omit group paths if ?groupPaths=false is given' , testService ( ( service ) =>
@@ -2279,11 +2279,13 @@ one,h,/data/h,2000-01-01T00:06,2000-01-01T00:07,-5,-6,,ee,ff
22792279 <model>
22802280 <instance>
22812281 <data id="selectMultiple" version='3'>
2282+ <meta><instanceID/></meta>
22822283 <q1/>
22832284 <g1><q2/></g1>
22842285 <q3/>
22852286 </data>
22862287 </instance>
2288+ <bind nodeset="/data/meta/instanceID" type="string"/>
22872289 <bind nodeset="/data/q1" type="string"/>
22882290 <bind nodeset="/data/g1/q2" type="string"/>
22892291 <bind nodeset="/data/q3" type="string"/>
@@ -2323,13 +2325,13 @@ one,h,/data/h,2000-01-01T00:06,2000-01-01T00:07,-5,-6,,ee,ff
23232325 . expect ( 200 )
23242326 . then ( ( { text } ) => {
23252327 const lines = text . split ( '\n' ) ;
2326- lines [ 0 ] . should . equal ( 'SubmissionDate,q1,q1/a,q1/b,g1-q2,g1-q2/m,g1-q2/x,g1-q2/y,g1-q2/z,q3,q3/z,KEY,SubmitterID,SubmitterName,AttachmentsPresent,AttachmentsExpected,Status,ReviewState,DeviceID,Edits,FormVersion' ) ;
2328+ lines [ 0 ] . should . equal ( 'SubmissionDate,meta-instanceID, q1,q1/a,q1/b,g1-q2,g1-q2/m,g1-q2/x,g1-q2/y,g1-q2/z,q3,q3/z,KEY,SubmitterID,SubmitterName,AttachmentsPresent,AttachmentsExpected,Status,ReviewState,DeviceID,Edits,FormVersion' ) ;
23272329 lines [ 1 ] . slice ( 'yyyy-mm-ddThh:mm:ss._msZ' . length )
2328- . should . equal ( ',a b,1,1,m,1,0,0,0,z,1,three,5,Alice,0,0,,,,0,3' ) ;
2330+ . should . equal ( ',three, a b,1,1,m,1,0,0,0,z,1,three,5,Alice,0,0,,,,0,3' ) ;
23292331 lines [ 2 ] . slice ( 'yyyy-mm-ddThh:mm:ss._msZ' . length )
2330- . should . equal ( ',b,0,1,m x,1,1,0,0,,0,two,5,Alice,0,0,,,,0,' ) ;
2332+ . should . equal ( ',two, b,0,1,m x,1,1,0,0,,0,two,5,Alice,0,0,,,,0,' ) ;
23312333 lines [ 3 ] . slice ( 'yyyy-mm-ddThh:mm:ss._msZ' . length )
2332- . should . equal ( ',a b,1,1,x y z,0,1,1,1,,0,one,5,Alice,0,0,,,,0,' ) ;
2334+ . should . equal ( ',one, a b,1,1,x y z,0,1,1,1,,0,one,5,Alice,0,0,,,,0,' ) ;
23332335 } ) ) ) ) ) ;
23342336 } ) ;
23352337 } ) ;
@@ -2471,11 +2473,11 @@ one,h,/data/h,2000-01-01T00:06,2000-01-01T00:07,-5,-6,,ee,ff
24712473 . then ( ( result ) => {
24722474 result . filenames . should . containDeep ( [ 'selectMultiple.csv' ] ) ;
24732475 const lines = result [ 'selectMultiple.csv' ] . split ( '\n' ) ;
2474- lines [ 0 ] . should . equal ( 'SubmissionDate,q1,q1/a,q1/b,g1-q2,g1-q2/m,g1-q2/x,g1-q2/y,g1-q2/z,KEY,SubmitterID,SubmitterName,AttachmentsPresent,AttachmentsExpected,Status,ReviewState,DeviceID,Edits,FormVersion' ) ;
2476+ lines [ 0 ] . should . equal ( 'SubmissionDate,meta-instanceID, q1,q1/a,q1/b,g1-q2,g1-q2/m,g1-q2/x,g1-q2/y,g1-q2/z,KEY,SubmitterID,SubmitterName,AttachmentsPresent,AttachmentsExpected,Status,ReviewState,DeviceID,Edits,FormVersion' ) ;
24752477 lines [ 1 ] . slice ( 'yyyy-mm-ddThh:mm:ss._msZ' . length )
2476- . should . equal ( ',b,0,1,m x,1,1,0,0,two,,,0,0,,,,0,' ) ;
2478+ . should . equal ( ',two, b,0,1,m x,1,1,0,0,two,,,0,0,,,,0,' ) ;
24772479 lines [ 2 ] . slice ( 'yyyy-mm-ddThh:mm:ss._msZ' . length )
2478- . should . equal ( ',a b,1,1,x y z,0,1,1,1,one,,,0,0,,,,0,' ) ;
2480+ . should . equal ( ',one, a b,1,1,x y z,0,1,1,1,one,,,0,0,,,,0,' ) ;
24792481 } ) ) ) ) ) ;
24802482 } ) ;
24812483
0 commit comments