My question is extremely close to that one :
Update Angular model after setting input value with jQuery
But, here, my input is modified by the val() method of Karma runner :
element('#stuff_input').val('theNewValForStuff');
I won't detail my test here, it would be irrelevant. But you will easily guess that the test will fail if binding is not properly maintained.
In production, #stuff_input is actually modified with the keyboard by user, never with any jQuery method of course. So I don't want to use $watch, I don't want to introduce any more complexity into my production code just because :
1) Karma do not allow keyboard input natively
2) Karma event do not maintain data-binding with val()
Any idea of how to solve this ?
Thanks
angular.element('#stuff_input').val(...)
? – Michael Benford Aug 28 at 13:28element
function. Have you triedinput(model_name).enter(value)
? – Michael Benford Aug 28 at 15:10