test(modeling/behavior): reorganize label positioning behavior specs

This commit is contained in:
Nico Rehwaldt 2019-04-25 13:53:34 +02:00
parent 8df95ed754
commit 2935b23ee4
2 changed files with 173 additions and 166 deletions

View File

@ -10,19 +10,14 @@ import {
import modelingModule from 'lib/features/modeling';
import coreModule from 'lib/core';
describe('modeling/behavior - AdaptiveLabelPositioningBehavior', function() {
var diagramXML = require('./AdaptiveLabelPositioningBehavior.bpmn');
beforeEach(bootstrapModeler(diagramXML, {
modules: [
var testModules = [
modelingModule,
coreModule
]
}));
];
describe('modeling/behavior - AdaptiveLabelPositioningBehavior', function() {
function expectLabelOrientation(element, expectedOrientation) {
var label = element.label;
@ -38,6 +33,15 @@ describe('modeling/behavior - AdaptiveLabelPositioningBehavior', function() {
}
describe('basics', function() {
var diagramXML = require('./AdaptiveLabelPositioningBehavior.basics.bpmn');
beforeEach(bootstrapModeler(diagramXML, {
modules: testModules
}));
describe('on connect', function() {
it('should move label from LEFT to TOP', inject(function(elementRegistry, modeling) {
@ -275,6 +279,9 @@ describe('modeling/behavior - AdaptiveLabelPositioningBehavior', function() {
expectLabelOrientation(element, 'top');
}
));
});
});
});