I am trying to insert data into test equipment, but so far have not been able to achieve. Returns this error: "was given a model to stamp, but the template is not of a bindable type"
My test code is as follows:
<test-fixture id="myFixture"> <template is="dom-template"> <my-element given-input="[[selectedInput]]"></myElement> </template> </test-fixture> <script> suite('<my-element>', function() { var myEl; setup(function() { myEl = fixture('myFixture', {selectedInput: 'test input'}); }); test('initiates my-element', function() { </script>
A similar question was asked here unit 1.0 unit tests - how to bind properties to a child? but the answer is not the one I am looking for as it directly defines target in the child
Also data binding in Polmyer <test-fixture> is a very problem, but also does not work for me.
My question is, how can we pass a property to an element through a test device in testing Polymer 2.x modules?
source share