2014-11-17 10:01:07 +00:00
|
|
|
'use strict';
|
|
|
|
|
2015-06-17 10:03:37 +00:00
|
|
|
var TestHelper = require('../../../TestHelper');
|
2015-02-05 08:24:27 +00:00
|
|
|
|
2015-06-17 10:03:37 +00:00
|
|
|
/* global bootstrapModeler, inject */
|
2014-11-17 10:01:07 +00:00
|
|
|
|
2015-06-17 10:03:37 +00:00
|
|
|
var modelingModule = require('../../../../lib/features/modeling'),
|
|
|
|
paletteModule = require('../../../../lib/features/palette'),
|
|
|
|
coreModule = require('../../../../lib/core');
|
2014-11-17 10:01:07 +00:00
|
|
|
|
2015-02-05 08:24:27 +00:00
|
|
|
var domQuery = require('min-dom/lib/query');
|
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);
|
|
|
|
var entries = domQuery.all('.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
|
|
|
|
|
|
|
});
|