I am using web-component tester from the command line to run fixture-based tests on my Polymer component. The tests succeed Chrome (v.47) but fail in Firefox (v.42). The issue is that in some change observer function in my Polymer component, the expected data is being received in Chrome, but is empty in Firefox, causing the tests to fail in the latter. Here are the essential codes:
Polymer Component: Polymer({ is: 'component-name',
properties: {
data: {
type: Array,
observer: '_dataChanged'
},
_dataChanged: function() {
process(this.data) // this line
...
},
...
In Chrome, the value of 'this.data' in "this line" above is non-empty, whatever was passed in the html fixture. This allows my test cases to succeed. But in Firefox, the value of 'this.data' received from the event is an empty array [], causing the said tests to fail. Any ideas why this is the case?
I've also tried wrapping my test suites inside an event listener for the 'WebComponentsReady' event, even though web-component-tester already ensures that the suites are started only after such an event fires. This approach still works in Chrome, and still fails in Firefox.