An example simple product component to show our testing principles.
<nap-product-summary> but with a lot of the features removed.
Using a bunch of ES6 so to be save run in Chrome.
Requries Polymer CLI to serve.
npm install -g polymer-cli bower install npm install
There are a few different types of tests run:
We run polylint over the code to make sure everything has been done correctly.
Designed to test the internal private methods work as expected, if these parameters are passed in do we get the expected result. These are run on both shady and shadow dom.
Designed to test the component has been rendered correctly and it behaves as expected. Checking content has been rendered and mocking any events required for testing.
Structured data tests
Test whether the component complies with Schema.org structured data standards.
Built with Polymer CLI.