Giter Site home page Giter Site logo

Comments (4)

deadlyfingers avatar deadlyfingers commented on August 22, 2024

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.

  • IronAjax events:
    sinon spy to watch 'iron-ajax' on-response event connected with pubsub callback.
  • jQuery ajax:
    PubSub.subscribe and PubSub.publish works directly with async jQuery calls.
    But a nicer way is to return the jQuery ajax result as a Deferred object - ideal for unit testing using done/fail promise chains.

from postcardapp.

deadlyfingers avatar deadlyfingers commented on August 22, 2024

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

from postcardapp.

deadlyfingers avatar deadlyfingers commented on August 22, 2024
  • Updated login tests as the username form is now a shared element.
  • Unit test issue with getting postcard data with image attachments. Somehow the image attachments are causing the test to fail.

from postcardapp.

deadlyfingers avatar deadlyfingers commented on August 22, 2024

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

from postcardapp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.