jeudi 10 mars 2016

Unit test jqgrid action

I need to verify that the jqxgrid's 'rowClicked' action gets called using mocha unit tests in EmberJS. I have a grid initialized and can verify that it gets rendered, rows and headers are rendered, but I'm stuck on the rowclick event. I use jQuery to simulate a click on a row like this:

this.$('#row0grid_testgrid').trigger('click');

My grid code listens for the rowClick event like this:

this.grid().on('rowclick', function(evt) {
        // My code here
    });

How can I verify that this gets called? Thanks

Aucun commentaire:

Enregistrer un commentaire