thaliproject / postcardapp

A sample app to demonstrate how to build Thali applications
MIT License
22 stars 5 forks source link

Polymer element Unit Tests #34

Closed deadlyfingers closed 8 years ago

deadlyfingers commented 9 years ago

Make a start on Unit Testing with Polymer web app.

deadlyfingers commented 8 years ago

Writing tests using web-component-tester: Tried various tools to rig up some Polymer unit tests for checking results of async methods using jQuery $.ajax or Polymer iron-ajax response events.

deadlyfingers commented 8 years ago

Tests can be run on: http://localhost:5000/test/

deadlyfingers commented 8 years ago
deadlyfingers commented 8 years ago

At the minute Polymer tests are run from localhost - http://localhost:5000/test/

But another thing to look at is configuring wct command (which launches the Selenium driver) - but it uses it's own server running on port 2000 so I would need to tie it into our jxcore localhost server running express server on port 5000. (NB: Safari also requires the Selenium SafariDriver extension to run tests - https://code.google.com/p/selenium/issues/detail?id=7933#c23) Related posts: http://stackoverflow.com/questions/33506850/how-can-i-replace-the-server-in-web-component-tester