2014-11-17 11:01:07 +01:00
|
|
|
'use strict';
|
|
|
|
|
2015-02-05 09:24:27 +01:00
|
|
|
require('../../../TestHelper');
|
|
|
|
|
2014-11-17 11:01:07 +01:00
|
|
|
|
|
|
|
var Modeler = require('../../../../lib/Modeler');
|
|
|
|
|
2015-02-05 09:24:27 +01:00
|
|
|
var domQuery = require('min-dom/lib/query');
|
2014-11-17 11:01:07 +01:00
|
|
|
|
|
|
|
|
|
|
|
describe('palette', function() {
|
|
|
|
|
|
|
|
var container;
|
|
|
|
|
|
|
|
beforeEach(function() {
|
|
|
|
container = jasmine.getEnv().getTestContainer();
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
it('should should draw palette', function(done) {
|
|
|
|
|
|
|
|
var modeler = new Modeler({ container: container });
|
|
|
|
modeler.createDiagram(function(err) {
|
|
|
|
|
|
|
|
// assume
|
|
|
|
var provider = modeler.get('paletteProvider');
|
|
|
|
|
|
|
|
// then
|
|
|
|
expect(provider).toBeTruthy();
|
|
|
|
|
|
|
|
// when
|
2015-02-05 09:24:27 +01:00
|
|
|
var paletteElement = domQuery('.djs-palette', container);
|
2014-11-17 11:01:07 +01:00
|
|
|
|
|
|
|
// then
|
2015-02-05 09:24:27 +01:00
|
|
|
expect(domQuery.all('.entry', paletteElement).length).toBe(7);
|
2014-11-17 11:01:07 +01:00
|
|
|
|
|
|
|
done(err);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|