mardi 27 septembre 2016

Ember.js acceptance test check inputs' values

I have a lot of logic in a big form, where input values depend on each other. I am trying to test values of these inputs.

In this case find("#sales_price").val() results in empty string:

fillIn("#sales_price", 12345);
andThen(function() {
  assert.equal(find("#sales_price").val(),123456);
...

In such example binding stops to work and find("#sales_price").val() gets initial value of input (but not 12345):

find("#sales_price").val(12345);
andThen(function() {
  assert.equal(find("#sales_price").val(),123456);
...

Aucun commentaire:

Enregistrer un commentaire