Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict';
require('../../TestHelper');
var DOMEvents = require('table-js/test/util/DOMEvents'),
createEvent = DOMEvents.createEvent;
/* global bootstrapModeler, inject */
var basicXML = require('../../../../fixtures/dmn/literal-expression.dmn');
describe('features/literal-expression', function() {
var modeler;
beforeEach(function(done) {
modeler = bootstrapModeler(basicXML)(done);
});
it('should should show the literal expression editor', inject(function(sheet) {
expect(sheet.getContainer().querySelector('.literal-expression-editor')).to.exist;
}));
var activatedSpy = sinon.spy(function() {}),
deactivatedSpy = sinon.spy(function() {});
var button = simpleMode._node;
eventBus.on('simpleMode.activated', activatedSpy);
eventBus.on('simpleMode.deactivated', deactivatedSpy);
// when
mouseEvent('click', button);
// then
expect(deactivatedSpy).to.have.been.called;
// when
mouseEvent('click', button);
// then
expect(activatedSpy).to.have.been.called;
}));
moddle: [ 'value', moddle ]
});
options = omit(options, 'additionalModules');
options = assign(options, {
sheet: {
width: options.width,
height: options.height,
container: container
},
modules: modules
});
// invoke table constructor
Table.call(this, options);
};
Viewer.prototype.destroy = function() {
// table destroy
Table.prototype.destroy.call(this);
// dom detach
domRemove(this.container);
};
'use strict';
var TestHelper = require('../helper');
var DOMEvents = require('table-js/test/util/DOMEvents'),
mouseEvent = DOMEvents.performMouseEvent,
createEvent = DOMEvents.createEvent;
function clickElement(element, isMousedown) {
return TestHelper.getDrdJS().invoke(function(elementRegistry) {
var target = elementRegistry.getGraphics(element);
if (!target) {
target = element;
}
if (isMousedown) {
mouseEvent('mousedown', target);
} else {
mouseEvent('click', target);
}
constructor(props, context) {
super(props, context);
inject(this);
}
constructor(props, context) {
super(props, context);
this.state = {};
inject(this);
this.persistChanges = this.debounceInput(this.persistChanges);
}
constructor(props, context) {
super(props, context);
inject(this);
}
constructor(props, context) {
super(props, context);
this.state = {};
inject(this);
this.persistChanges = this.debounceInput(this.persistChanges);
this._expressionLanguages = context.injector.get('expressionLanguages');
}
constructor(props, context) {
super(props, context);
inject(this);
this.addRule = this.addRule.bind(this);
}