|
|
@ -124,21 +124,21 @@ module.exports = { |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
it('Target style is empty without values', () => { |
|
|
it('Target style is empty without values', () => { |
|
|
expect(view.getComponentValue()).toNotExist(); |
|
|
expect(view.getTargetValue()).toNotExist(); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
it('Target style is correct', () => { |
|
|
it('Target style is correct', () => { |
|
|
var style = {}; |
|
|
var style = {}; |
|
|
style[propName] = propValue; |
|
|
style[propName] = propValue; |
|
|
component.set('style', style); |
|
|
component.set('style', style); |
|
|
expect(view.getComponentValue()).toEqual(propValue); |
|
|
expect(view.getTargetValue()).toEqual(propValue); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
it('Target style is empty with an other style', () => { |
|
|
it('Target style is empty with an other style', () => { |
|
|
var style = {}; |
|
|
var style = {}; |
|
|
style[propName + '2'] = propValue; |
|
|
style[propName + '2'] = propValue; |
|
|
component.set('style', style); |
|
|
component.set('style', style); |
|
|
expect(view.getComponentValue()).toNotExist(); |
|
|
expect(view.getTargetValue()).toNotExist(); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
it('Fetch value from function', () => { |
|
|
it('Fetch value from function', () => { |
|
|
@ -147,7 +147,7 @@ module.exports = { |
|
|
style[propName] = 'testfun(' + propValue + ')'; |
|
|
style[propName] = 'testfun(' + propValue + ')'; |
|
|
component.set('style', style); |
|
|
component.set('style', style); |
|
|
view.model.set('functionName', 'testfun'); |
|
|
view.model.set('functionName', 'testfun'); |
|
|
expect(view.getComponentValue()).toEqual(propValue); |
|
|
expect(view.getTargetValue()).toEqual(propValue); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
describe('With target setted', () => { |
|
|
describe('With target setted', () => { |
|
|
|