test(NavigatedViewer): verify editor action support
This commit is contained in:
parent
37e38e9a2a
commit
a348092230
|
@ -1,7 +1,10 @@
|
|||
import NavigatedViewer from 'lib/NavigatedViewer';
|
||||
|
||||
import EditorActionsModule from 'lib/features/editor-actions';
|
||||
|
||||
import TestContainer from 'mocha-test-container-support';
|
||||
|
||||
|
||||
describe('NavigatedViewer', function() {
|
||||
|
||||
var container;
|
||||
|
@ -27,6 +30,49 @@ describe('NavigatedViewer', function() {
|
|||
});
|
||||
|
||||
|
||||
describe('editor actions support', function() {
|
||||
|
||||
it('should not ship per default', function() {
|
||||
|
||||
// given
|
||||
var navigatedViewer = new NavigatedViewer();
|
||||
|
||||
// when
|
||||
var editorActions = navigatedViewer.get('editorActions', false);
|
||||
|
||||
// then
|
||||
expect(editorActions).not.to.exist;
|
||||
});
|
||||
|
||||
|
||||
it('should ship non-modeling actions if included', function() {
|
||||
|
||||
// given
|
||||
var expectedActions = [
|
||||
'stepZoom',
|
||||
'zoom',
|
||||
'moveCanvas',
|
||||
'selectElements'
|
||||
];
|
||||
|
||||
var navigatedViewer = new NavigatedViewer({
|
||||
additionalModules: [
|
||||
EditorActionsModule
|
||||
]
|
||||
});
|
||||
|
||||
// when
|
||||
var editorActions = navigatedViewer.get('editorActions');
|
||||
|
||||
// then
|
||||
var actualActions = editorActions.getActions();
|
||||
|
||||
expect(actualActions).to.eql(expectedActions);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
describe('navigation features', function() {
|
||||
|
||||
var xml = require('../fixtures/bpmn/simple.bpmn');
|
||||
|
|
Loading…
Reference in New Issue