OpenWireless icon indicating copy to clipboard operation
OpenWireless copied to clipboard

Use real Mustache templates in spec tests

Open jsha opened this issue 10 years ago • 1 comments

Using jasmine-fixture in spec allows changes to the HTML to break the app without causing tests to fail.

Right now our tests use a function called affix that's part of jasmine-fixture in order to generate a dummy HTML page for testing, e.g.

affix('form input#newPassword+input#retypePassword+input#newPasswordError+input#retypePasswordError+input#oldPassword+div#genericError');

Unfortunately that means that we can change the handlebars templates in a breaking way without breaking any tests. Instead, the tests should load the compiled Mustache templates from app/js/templates.js and interpolate them with appropriate values for each test.

jsha avatar Mar 06 '15 02:03 jsha

We are working on this at the hackathon!

r4d1n avatar Apr 18 '15 19:04 r4d1n