Hey I'm trying to write a test that fills an input and then checks the validity of a button.
test("Recipe add form", function(assert) {
assert.expect(3);
visit('recipe/add').then(function() {
assert.equal(find('.formIsDisabled').length, 1, "Form button is disabled");
fillIn('input.nameInput', "My new recipe");
assert.equal(find('.formIsDisabled').length, 0, "Form button is enabled");
assert.equal(find('input.nameInput').text(), "My new recipe");
});
});
But for some reason the "fillIn" helper does not work.
The template's name input
{{input type="text" value=recipe.name class="form-control nameInput"}}
The outcome..
Expected: 0 Result: 1
Expected: "My new recipe" Result: ""
When i cancelled App.destroy() i could see that the input was actually filled but the code doesnt seem to accept that..
Aucun commentaire:
Enregistrer un commentaire