0
我有一个测试套件是这样的:如何测试Polymer dom属性?
setup(function() {
form = fixture('basic');
});
test('hide and show error message', function() {
title = Polymer.dom(form.root).querySelector('#title');
save = Polymer.dom(form.root).querySelector('#save');
expect(Polymer.dom(title).hasAttribute('invalid')).to.be.false;
MockInteractions.tap(save);
expect(Polymer.dom(title).hasAttribute('invalid')).to.be.true;
});
当然,Polymer.dom(...)
不具备的功能hasAttribute()
我怎样才能得到比较属性,或者是有另一种方式来测试invalid
paper-input
的属性?
在此先感谢。