2018-04-02 19:01:53 +00:00
|
|
|
import {
|
|
|
|
bootstrapModeler,
|
|
|
|
inject
|
|
|
|
} from 'test/TestHelper';
|
|
|
|
|
|
|
|
import modelingModule from 'lib/features/modeling';
|
|
|
|
import paletteModule from 'lib/features/palette';
|
|
|
|
import coreModule from 'lib/core';
|
|
|
|
|
|
|
|
import {
|
|
|
|
query as domQuery,
|
|
|
|
queryAll as domQueryAll
|
|
|
|
} from 'min-dom';
|
2014-11-17 10:01:07 +00:00
|
|
|
|
|
|
|
|
2015-06-17 10:03:37 +00:00
|
|
|
describe('features/palette', function() {
|
2014-11-17 10:01:07 +00:00
|
|
|
|
2015-06-17 10:03:37 +00:00
|
|
|
var diagramXML = require('../../../fixtures/bpmn/features/replace/01_replace.bpmn');
|
2014-11-17 10:01:07 +00:00
|
|
|
|
2015-06-17 10:03:37 +00:00
|
|
|
var testModules = [ coreModule, modelingModule, paletteModule ];
|
2014-11-17 10:01:07 +00:00
|
|
|
|
2015-06-17 10:03:37 +00:00
|
|
|
beforeEach(bootstrapModeler(diagramXML, { modules: testModules }));
|
2014-11-17 10:01:07 +00:00
|
|
|
|
|
|
|
|
2015-06-17 10:03:37 +00:00
|
|
|
it('should provide BPMN modeling palette', inject(function(canvas, palette) {
|
2014-11-17 10:01:07 +00:00
|
|
|
|
2015-06-17 10:03:37 +00:00
|
|
|
// when
|
|
|
|
var paletteElement = domQuery('.djs-palette', canvas._container);
|
2018-03-21 23:54:59 +00:00
|
|
|
var entries = domQueryAll('.entry', paletteElement);
|
2014-11-17 10:01:07 +00:00
|
|
|
|
2015-06-17 10:03:37 +00:00
|
|
|
// then
|
2016-04-13 10:36:19 +00:00
|
|
|
expect(entries.length).to.equal(13);
|
2015-06-17 10:03:37 +00:00
|
|
|
}));
|
2014-11-17 10:01:07 +00:00
|
|
|
|
|
|
|
});
|