mirror of
https://github.com/sartography/bpmn-js-spiffworkflow.git
synced 2025-02-23 13:08:11 +00:00
test for message payload
This commit is contained in:
parent
89436f3e9c
commit
91d3744f02
@ -1,5 +1,5 @@
|
|||||||
import TestContainer from 'mocha-test-container-support';
|
import TestContainer from 'mocha-test-container-support';
|
||||||
import {bootstrapPropertiesPanel, expectSelected, findEntry, findGroupEntry, findSelect} from './helpers';
|
import { bootstrapPropertiesPanel, expectSelected, findEntry, findGroupEntry, findInput, findSelect, findTextarea } from './helpers';
|
||||||
import { BpmnPropertiesPanelModule, BpmnPropertiesProviderModule } from 'bpmn-js-properties-panel';
|
import { BpmnPropertiesPanelModule, BpmnPropertiesProviderModule } from 'bpmn-js-properties-panel';
|
||||||
import spiffModdleExtension from '../../app/spiffworkflow/moddle/spiffworkflow.json';
|
import spiffModdleExtension from '../../app/spiffworkflow/moddle/spiffworkflow.json';
|
||||||
import messages from '../../app/spiffworkflow/messages';
|
import messages from '../../app/spiffworkflow/messages';
|
||||||
@ -59,8 +59,25 @@ describe('Messages should work', function() {
|
|||||||
expect(selector).to.exist;
|
expect(selector).to.exist;
|
||||||
expect(selector.length).to.equal(2);
|
expect(selector.length).to.equal(2);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should show the payload inside the message group',async function() {
|
||||||
|
|
||||||
|
// Select the second Task
|
||||||
|
const send_shape = await expectSelected('ActivitySendLetter');
|
||||||
|
expect(send_shape, "Can't find Send Task").to.exist;
|
||||||
|
|
||||||
|
// THEN - there is a payload.
|
||||||
|
let payload = findEntry('messagePayload', container);
|
||||||
|
expect(payload, "Can't find the message payload").to.exist;
|
||||||
|
|
||||||
|
let textArea = findTextarea('bio-properties-panel-messagePayload', container);
|
||||||
|
expect(textArea, "Can't find the payload text").to.exist;
|
||||||
|
expect(textArea.innerHTML, "Can't find innerHTML").to.exist;
|
||||||
|
|
||||||
|
console.log('innerHTML', textArea.innerHTML);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -111,6 +111,10 @@ export function findInput(type, container) {
|
|||||||
return domQuery(`input[type='${ type }']`, container);
|
return domQuery(`input[type='${ type }']`, container);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function findTextarea(id, container) {
|
||||||
|
return domQuery(`textarea[id='${ id }']`, container);
|
||||||
|
}
|
||||||
|
|
||||||
export function findButton(id, container) {
|
export function findButton(id, container) {
|
||||||
return domQuery(`button[id='${ id }']`, container);
|
return domQuery(`button[id='${ id }']`, container);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user