test(modeling/behavior): reorganize label positioning behavior specs
This commit is contained in:
parent
8df95ed754
commit
2935b23ee4
|
@ -10,19 +10,14 @@ import {
|
||||||
import modelingModule from 'lib/features/modeling';
|
import modelingModule from 'lib/features/modeling';
|
||||||
import coreModule from 'lib/core';
|
import coreModule from 'lib/core';
|
||||||
|
|
||||||
|
var testModules = [
|
||||||
describe('modeling/behavior - AdaptiveLabelPositioningBehavior', function() {
|
|
||||||
|
|
||||||
var diagramXML = require('./AdaptiveLabelPositioningBehavior.bpmn');
|
|
||||||
|
|
||||||
beforeEach(bootstrapModeler(diagramXML, {
|
|
||||||
modules: [
|
|
||||||
modelingModule,
|
modelingModule,
|
||||||
coreModule
|
coreModule
|
||||||
]
|
];
|
||||||
}));
|
|
||||||
|
|
||||||
|
|
||||||
|
describe('modeling/behavior - AdaptiveLabelPositioningBehavior', function() {
|
||||||
|
|
||||||
function expectLabelOrientation(element, expectedOrientation) {
|
function expectLabelOrientation(element, expectedOrientation) {
|
||||||
|
|
||||||
var label = element.label;
|
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() {
|
describe('on connect', function() {
|
||||||
|
|
||||||
it('should move label from LEFT to TOP', inject(function(elementRegistry, modeling) {
|
it('should move label from LEFT to TOP', inject(function(elementRegistry, modeling) {
|
||||||
|
@ -275,6 +279,9 @@ describe('modeling/behavior - AdaptiveLabelPositioningBehavior', function() {
|
||||||
expectLabelOrientation(element, 'top');
|
expectLabelOrientation(element, 'top');
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue