Skip to content

Commit

Permalink
test: verify XML entity encoding (zeebe:userTaskForm)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikku committed Jul 9, 2021
1 parent 34c69a0 commit 8f563c9
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions test/spec/xml/write.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,36 @@ describe('write', function() {
expect(xml).to.eql(expectedXML);
});


it('zeebe:userTaskForm', async function() {

// given
var proc = moddle.create('bpmn:Process', {
extensionElements: moddle.create('bpmn:ExtensionElements', {
values: [
moddle.create('zeebe:UserTaskForm', {
id: 'userTaskForm-1',
body: '{ components: [ { label: "field", key: "field" } ] }'
}),
moddle.create('zeebe:UserTaskForm', {
id: 'userTaskForm-2',
body: '{ components: [ { label: "<field>", key: "field" } ] }'
})
]
})
});

var expectedXML = '<zeebe:calledElement ' +
'xmlns:zeebe="http://camunda.org/schema/zeebe/1.0" ' +
'propagateAllChildVariables="false" />';

// when
const xml = await write(proc);

// then
expect(xml).to.eql(expectedXML);
});

});

});

0 comments on commit 8f563c9

Please sign in to comment.