bpmn-js/test/spec/features/palette/PaletteProviderSpec.js

34 lines
892 B
JavaScript
Raw Normal View History

'use strict';
var TestHelper = require('../../../TestHelper');
/* global bootstrapModeler, inject */
var modelingModule = require('../../../../lib/features/modeling'),
paletteModule = require('../../../../lib/features/palette'),
coreModule = require('../../../../lib/core');
var domQuery = require('min-dom/lib/query');
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 = domQuery.all('.entry', paletteElement);
// then
2015-09-02 14:23:47 +00:00
expect(entries.length).to.equal(10);
}));
});