Browse Source

Add tests for important in style properties

multiple-select
Artur Arseniev 8 years ago
parent
commit
a7408fb14c
  1. 12
      test/specs/style_manager/model/Models.js

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

@ -159,6 +159,18 @@ module.exports = {
expect(obj.parseValue('fn(testValue)')).toEqual(result);
expect(obj.parseValue('fn(testValue')).toEqual(result);
});
test('Parse correctly a value with !important', () => {
const result = { value: 'red', important: 1 };
expect(obj.parseValue('red !important ')).toEqual(result);
});
test('getFullValue', () => {
obj = new Property({ functionName: 'fn', value: 'red' });
expect(obj.getFullValue()).toEqual('fn(red)');
obj = new Property({ functionName: 'fn', value: '#123', important: 1 });
expect(obj.getFullValue()).toEqual('fn(#123) !important');
});
});
describe('PropertyInteger', () => {

Loading…
Cancel
Save