mardi 22 septembre 2015

Testing SweetAlert using ember-qunit

I am reliably wondering the best way to interact with third-party libraries in Ember qunit acceptance tests. When I try to run a qunit acceptance test and I get to testing a sweet alert, clicking the sweet alert's 'confirm' button doesn't seem to trigger properly on most occasions (from time to time it seems to work properly).

andThen(function(){
    IHSweetAlert = Ember.$(".sweet-alert");
    var text = IHSweetAlert.children("h2").text();
    assert.equal(text, "Are you sure?", "Sweet alert's header text is Are you sure?");
    IHSweetAlert.children(".confirm").trigger('click');
});




Aucun commentaire:

Enregistrer un commentaire