I am trying to write an acceptance test that covers a component which handles the focus-out event on an input element. But nothing I do seems to trigger the event and so my subsequent action never gets sent.
In the test I have tried the following:
field = find('.profile-field').eq(0);
fillIn(field.find('input'), 'a new response');
keyEvent(field.find('input'), 'keyup', 9); //tab out of field
or
field = find('.profile-field').eq(0);
fillIn(field.find('input'), 'a new response');
find('.profile-field').eq(1).focus(); //set focus to another field
or
field = find('.profile-field').eq(0);
fillIn(field.find('input'), 'a new response');
triggerEvent(field, "blur");
I have also tried using the click() helper on other elements on the page, but nothing seems to trigger the event.
Any suggestions on how to achieve this? Thanks