Fix for unit tests after refactoring
This commit is contained in:
parent
558ef8a2db
commit
2fbdfdbf6a
|
@ -2,7 +2,7 @@ import utils from './utils';
|
|||
import assignWithDepth from './assignWithDepth';
|
||||
import detectType from './diagram-api/detectType';
|
||||
import addDiagrams from './diagram-api/diagram-orchestration';
|
||||
|
||||
import { configureSvgSize, calculateSvgSizeAttrs } from './setupGraphViewbox';
|
||||
addDiagrams();
|
||||
|
||||
describe('when assignWithDepth: should merge objects within objects', function () {
|
||||
|
@ -293,13 +293,13 @@ describe('when formatting urls', function () {
|
|||
});
|
||||
describe('when calculating SVG size', function () {
|
||||
it('should return width 100% when useMaxWidth is true', function () {
|
||||
const attrs = utils.calculateSvgSizeAttrs(100, 200, true);
|
||||
const attrs = calculateSvgSizeAttrs(100, 200, true);
|
||||
// expect(attrs.get('height')).toEqual(100);
|
||||
expect(attrs.get('style')).toEqual('max-width: 200px;');
|
||||
expect(attrs.get('width')).toEqual('100%');
|
||||
});
|
||||
it('should return absolute width when useMaxWidth is false', function () {
|
||||
const attrs = utils.calculateSvgSizeAttrs(100, 200, false);
|
||||
const attrs = calculateSvgSizeAttrs(100, 200, false);
|
||||
// expect(attrs.get('height')).toEqual(100);
|
||||
expect(attrs.get('width')).toEqual(200);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue