mirror of
https://github.com/sartography/spiff-arena.git
synced 2025-01-15 03:55:57 +00:00
9213cea140
96dcd1a24 Merge pull request #23 from sartography/feature/more_launch_buttons_and_dropdowns f6eb4123d disable test for disabled button. 84593aee1 remove launch button for call activities. b28569687 fixing a bug in SpiffScript Group e12e27ed5 fixing a bug in SpiffScript Group 7b4ca1919 Merge branch 'main' into feature/more_launch_buttons_and_dropdowns 38b23ae4e No reason to force _files on there, when this could work for any set of options. 1e75ff7b5 Standardize all Event Names, and document in README. Fix the SpiffExtensions so they work consistently with both nested Extension Properties, and as single extensions depending on the namespace. Add a Spiff Extension Text Area. Everything that is within the body of tag can be referenced with ".value" -- there was a lot of pointless inconsistency in the moddle json file. aeeaf1596 DMN selection should be from a dropdown, not by hand entering a process id. ecb175d72 Add Launch Editor buttons for Json files. (fires 'file.editor.launch', with a fileName) 6467e967b Adding a Launch Button for Call Activity Json files are now a selection list, not a text field -- see app.json for usage. New SpiffExtensionSelect can be used to add select boxes anywhere you want. git-subtree-dir: bpmn-js-spiffworkflow git-subtree-split: 96dcd1a2497f84f8ca3f2a82e311d50e391bf7b7
84 lines
2.8 KiB
JavaScript
84 lines
2.8 KiB
JavaScript
import TestContainer from 'mocha-test-container-support';
|
|
import {
|
|
BpmnPropertiesPanelModule,
|
|
BpmnPropertiesProviderModule,
|
|
} from 'bpmn-js-properties-panel';
|
|
import { query as domQuery } from 'min-dom';
|
|
import { getBusinessObject } from 'bpmn-js/lib/util/ModelUtil';
|
|
import { inject } from 'bpmn-js/test/helper';
|
|
import {
|
|
bootstrapPropertiesPanel,
|
|
changeInput,
|
|
expectSelected, findButton,
|
|
findGroupEntry, pressButton,
|
|
} from './helpers';
|
|
import spiffModdleExtension from '../../app/spiffworkflow/moddle/spiffworkflow.json';
|
|
import callActivity from '../../app/spiffworkflow/callActivity';
|
|
|
|
|
|
describe('Call Activities should work', function () {
|
|
const xml = require('./bpmn/call_activity.bpmn').default;
|
|
let container;
|
|
|
|
beforeEach(function () {
|
|
container = TestContainer.get(this);
|
|
});
|
|
|
|
beforeEach(
|
|
bootstrapPropertiesPanel(xml, {
|
|
container,
|
|
debounceInput: false,
|
|
additionalModules: [
|
|
callActivity,
|
|
BpmnPropertiesPanelModule,
|
|
BpmnPropertiesProviderModule,
|
|
],
|
|
moddleExtensions: {
|
|
spiffworkflow: spiffModdleExtension,
|
|
},
|
|
})
|
|
);
|
|
|
|
it('should allow you to view the called element section of a Call Activity', async function () {
|
|
const shapeElement = await expectSelected('the_call_activity');
|
|
expect(shapeElement, "Can't find Call Activity").to.exist;
|
|
const entry = findGroupEntry('called_element', container);
|
|
expect(entry).to.exist;
|
|
});
|
|
|
|
it('should allow you to edit the called element section of a Call Activity', async function () {
|
|
const shapeElement = await expectSelected('the_call_activity');
|
|
expect(shapeElement, "Can't find Call Activity").to.exist;
|
|
const businessObject = getBusinessObject(shapeElement);
|
|
expect(businessObject.get('calledElement')).to.equal('ProcessIdTBD1');
|
|
|
|
const entry = findGroupEntry('called_element', container);
|
|
expect(entry).to.exist;
|
|
|
|
const textInput = domQuery('input', entry);
|
|
changeInput(textInput, 'newProcessId');
|
|
expect(businessObject.get('calledElement')).to.equal('newProcessId');
|
|
});
|
|
|
|
/** fixme: Reenable this when we add this button back in.
|
|
it('should issue an event to the event bus if user clicks the edit button', inject(
|
|
async function(eventBus) {
|
|
const shapeElement = await expectSelected('the_call_activity');
|
|
expect(shapeElement, "Can't find Call Activity").to.exist;
|
|
const businessObject = getBusinessObject(shapeElement);
|
|
expect(businessObject.get('calledElement')).to.equal('ProcessIdTBD1');
|
|
|
|
const entry = findGroupEntry('called_element', container);
|
|
const button = findButton('spiffworkflow-open-call-activity-button', entry);
|
|
expect(button).to.exist;
|
|
|
|
let launchEvent;
|
|
eventBus.on('spiff.callactivity.edit', function (event) {
|
|
launchEvent = event;
|
|
});
|
|
await pressButton(button);
|
|
expect(launchEvent.processId).to.exist;
|
|
}));
|
|
*/
|
|
});
|