Hi everybody,
I'm struggling by testing a component I've created. All the test examples in the wild are very small and do not show how more complex tests can be made.
My element is a <context-menu> which accepts one attribute (items). items is a array which contains objects with two keys (pageKey, name) representing the unique key for a page and a human readable name to show in the visual part.
I would add other test methods to also check, if the given items array is properly rendered in the DOM. But when I try to use document.querySelector('context-menu').shadowRoot.querySelector('paper-items') I'll always get the default values I've put statically into the custom elements definition. Even when I use Polymer.flush().
Is there any problem with the data binding in my <template>, which creates the document fragment? Does this data binding cause the problems?
Any hint in any direction would be helpful for me.