mirror of
https://github.com/sartography/bpmn-js.git
synced 2025-01-17 12:30:58 +00:00
d3449ca87c
* use ES6 import / export * UTILS: export individual utilities * TESTS: localize TestHelper includes BREAKING CHANGE: * all utilities export independent functions * library sources got ported to ES6. You must now use a ES module bundler such as Browserify + babelify or Webpack to consume this library (or parts of it).
38 lines
851 B
JavaScript
38 lines
851 B
JavaScript
'use strict';
|
|
|
|
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';
|
|
|
|
|
|
describe('features/palette', function() {
|
|
|
|
var diagramXML = require('../../../fixtures/bpmn/features/replace/01_replace.bpmn');
|
|
|
|
var testModules = [ coreModule, modelingModule, paletteModule ];
|
|
|
|
beforeEach(bootstrapModeler(diagramXML, { modules: testModules }));
|
|
|
|
|
|
it('should provide BPMN modeling palette', inject(function(canvas, palette) {
|
|
|
|
// when
|
|
var paletteElement = domQuery('.djs-palette', canvas._container);
|
|
var entries = domQueryAll('.entry', paletteElement);
|
|
|
|
// then
|
|
expect(entries.length).to.equal(13);
|
|
}));
|
|
|
|
});
|