This repository has been archived by the owner on Sep 7, 2022. It is now read-only.
Adding simple watchable functional test capabilities #59
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @robdodson ,
The Good:
This small addition allows creation of unit/functional test files (residing in 'functest', which are picked up on any element code change (html under src) or functional test script change (js under functest).
The Bad:
I have tried it locally in the generated project, where it works fine, but couldn't see how to run and test the modified generator with a local setup (only when pulled from npm... more to learn). So what you see is modified to match the working project but not actally tried out as is (so I fully accept some iterations here).
The Ugly:
Currently, each test script finds a specific Polymer 1 element file and uses the existing build functionality to rip out and eval the script part, where the Polymer function is hijacked (works for locally mocked function testing - but maybe you have a better idea?).
Anyway - please tell me where to go from here :)
NOTE: In our devgroup, we need something for Polymer 2 like this VERY soon - and given the approach would not work on classes (the same way as hijacking the Polymer function), I'd really appreciate some inspirational input ;)
br
Lars