Get help with testing, discuss unit testing strategies etc.


Post by locutusut »

I'm experiencing an issue where by all the assertions in my tests pass, but my test shows failed due to the following exception:
Test suite threw an exception: method.$owner is undefined https://localhost:8234/src/main/webapp/lib/extjs4/ext-all-debug.js 2887
The test is fairly trivial:
StartTest(function(t) {
    t.requireOk(
        [
         'XXX.model.vehicle.DutyStatus',
         'XXX.store.vehicle.DutyStatuses',
         'XXX.view.vehicle.VehiclesTab'
         ],
        function() {
            var grid = Ext.create('XXX.view.vehicle.DutyStatusList', {
                renderTo : Ext.getBody(),
                store : new Ponderosa.store.vehicle.DutyStatuses(),
                height : 200,
                width : 300
            });

            t.waitForRowsVisible(grid, function() {
                t.is(grid.store.getCount(), grid.getView().getNodes().length, 'Rendered all data in store ok');
                t.matchGridCellContent(grid, 0, 1, grid.store.first().get('dutyStatus'), 'Found correct Duty Status in first cell');
            });
        }
    );
});
I've noticed that if I set the config "Transparent Exceptions", the test will go green w/o the exception, but I'm not sure if I want to do that.

TIA!

Post by mats »

Which Siesta version? Ext version?

Post by locutusut »

4.0.7 ExtJS and 1.0.6 Siesta Lite.

Post by nickolay »

Do you see the same behaviour both in Chrome and FF? Can you also put "break on error" in debugger and see what is the source of the exception?

Post Reply