Browse Source

Fix regressions

pull/1518/head
Artur Arseniev 8 years ago
parent
commit
12de1d57c9
  1. 3
      src/style_manager/model/Layers.js
  2. 1
      test/specs/style_manager/index.js
  3. 4
      test/specs/style_manager/model/Models.js

3
src/style_manager/model/Layers.js

@ -19,7 +19,8 @@ module.exports = Backbone.Collection.extend({
}, },
getSeparator() { getSeparator() {
return this.property.get('layerSeparator'); const { property } = this;
return property ? property.get('layerSeparator') : ', ';
}, },
/** /**

1
test/specs/style_manager/index.js

@ -155,6 +155,7 @@ describe('StyleManager', () => {
} }
] ]
}); });
obj.onLoad();
}); });
afterEach(() => { afterEach(() => {

4
test/specs/style_manager/model/Models.js

@ -155,7 +155,7 @@ module.exports = {
test('parseValue with function and functionName', () => { test('parseValue with function and functionName', () => {
obj = new Property({ functionName: 'fn' }); obj = new Property({ functionName: 'fn' });
const result = { value: 'testValue' }; const result = { value: 'testValue', functionName: 'fn' };
expect(obj.parseValue('fn(testValue)')).toEqual(result); expect(obj.parseValue('fn(testValue)')).toEqual(result);
expect(obj.parseValue('fn(testValue')).toEqual(result); expect(obj.parseValue('fn(testValue')).toEqual(result);
}); });
@ -194,7 +194,7 @@ module.exports = {
units: ['px', 'deg'], units: ['px', 'deg'],
functionName: 'test' functionName: 'test'
}); });
const result = { value: 55, unit: 'deg' }; const result = { value: 55, unit: 'deg', functionName: 'test' };
expect(obj.parseValue('test(55deg)')).toEqual(result); expect(obj.parseValue('test(55deg)')).toEqual(result);
}); });

Loading…
Cancel
Save