mirror of
https://github.com/sartography/bpmn-js.git
synced 2025-01-22 23:08:49 +00:00
parent
aba0088e5e
commit
d0044f8313
@ -1,19 +1,23 @@
|
||||
import {
|
||||
bootstrapModeler,
|
||||
inject
|
||||
inject,
|
||||
getBpmnJS
|
||||
} from 'test/TestHelper';
|
||||
|
||||
import {
|
||||
pick
|
||||
} from 'min-dash';
|
||||
|
||||
import modelingModule from 'lib/features/modeling';
|
||||
import contextPadModule from 'lib/features/context-pad';
|
||||
import coreModule from 'lib/core';
|
||||
import modelingModule from 'lib/features/modeling';
|
||||
|
||||
import {
|
||||
getChildLanes
|
||||
} from 'lib/features/modeling/util/LaneUtil';
|
||||
|
||||
import { query as domQuery } from 'min-dom';
|
||||
|
||||
var DEFAULT_LANE_HEIGHT = 120;
|
||||
|
||||
|
||||
@ -262,4 +266,62 @@ describe('features/modeling - add Lane', function() {
|
||||
|
||||
});
|
||||
|
||||
|
||||
describe('Internet Explorer', function() {
|
||||
|
||||
var diagramXML = require('./participant-single-lane.bpmn');
|
||||
|
||||
var testModules = [
|
||||
contextPadModule,
|
||||
coreModule,
|
||||
modelingModule
|
||||
];
|
||||
|
||||
beforeEach(bootstrapModeler(diagramXML, { modules: testModules }));
|
||||
|
||||
|
||||
// must be executed manually, cannot be reproduced programmatically
|
||||
// https://github.com/bpmn-io/bpmn-js/issues/746
|
||||
it('should NOT blow up in Internet Explorer', inject(
|
||||
function(contextPad, elementRegistry) {
|
||||
|
||||
// given
|
||||
var lane = elementRegistry.get('Lane_1');
|
||||
|
||||
contextPad.open(lane);
|
||||
|
||||
// mock event
|
||||
var event = padEvent('lane-insert-below');
|
||||
|
||||
// when
|
||||
contextPad.trigger('click', event);
|
||||
|
||||
// then
|
||||
// expect Internet Explorer NOT to blow up
|
||||
}
|
||||
));
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
// helpers //////////
|
||||
|
||||
function padEntry(element, name) {
|
||||
return domQuery('[data-action="' + name + '"]', element);
|
||||
}
|
||||
|
||||
function padEvent(entry) {
|
||||
|
||||
return getBpmnJS().invoke(function(overlays) {
|
||||
|
||||
var target = padEntry(overlays._overlayRoot, entry);
|
||||
|
||||
return {
|
||||
target: target,
|
||||
preventDefault: function() {},
|
||||
clientX: 100,
|
||||
clientY: 100
|
||||
};
|
||||
});
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_0e8iwaa" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.1.2">
|
||||
<bpmn:collaboration id="Collaboration_1">
|
||||
<bpmn:participant id="Participant_1" name="Participant_1" processRef="Process_1" />
|
||||
</bpmn:collaboration>
|
||||
<bpmn:process id="Process_1" isExecutable="true" camunda:modelerTemplate="test">
|
||||
<bpmn:laneSet id="LaneSet_19hihz6">
|
||||
<bpmn:lane id="Lane_1" name="Lane_1" />
|
||||
</bpmn:laneSet>
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_1">
|
||||
<bpmndi:BPMNShape id="Participant_1j1fs6n_di" bpmnElement="Participant_1" isHorizontal="true">
|
||||
<dc:Bounds x="164" y="110" width="600" height="250" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Lane_0fl7487_di" bpmnElement="Lane_1" isHorizontal="true">
|
||||
<dc:Bounds x="194" y="110" width="570" height="250" />
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
Loading…
x
Reference in New Issue
Block a user