Hello I am writing unit test for application having bootstrap modal popups.
The issue is modal popup has animation that took longer to open modal. When I trigger apply button click on modal that leads to exception. As modal popup not loaded.
Removing below line from bootstrap.js fix the issue but I can't change it or remove it as it in my application.
doAnimate ?
this.$backdrop.one($.support.transition.end, callback) :
callback()
To overcome this issue I have tried timeout
, settimeout
, delay
functions but that leads to the error: Error: timeout of 2000ms exceeded
this.$fixture.find(".apply").trigger('click'); // opens modal popup
$('.apply-yes').delay(1900).trigger('click'); // clicks on apply button on modal
Please suggest an appropriate solution to problem without changing anything in bootstrap or application.
Aucun commentaire:
Enregistrer un commentaire