Get help with testing, discuss unit testing strategies etc.


Post by kunal.pingalkar »

Hello all,

I am going to test one controller method using siesta, in this method i check the store data load properly or not.
While testing this method using siesta, i didn't got store data. please help me in this case.
In following code getControllerClassName and getStoreClassName are user defined methods.

My code:
StartTest(function(t) {

    t.requireOk([
			getControllerClassName('base.BaseController'),
			getStoreClassName('FilmStore')
		], function() {
        var mod = Ext.create(getControllerClassName('base.BaseController'));
		
        var storeName = Ext.create(getStoreClassName('FilmStore'));
		t.is(mod.getFilmStoreData(), null, 'getFilmStoreData works ok');
		//console.log(storeName);
		t.loadStoresAndThen(storeName, function(){
			console.log('store load');
		});
	});
});
Thanks in advance.

Post by mats »

What's going wrong? Can you submit your Siesta test case so we can inspect it?

Post by kunal.pingalkar »

mats wrote:What's going wrong? Can you submit your Siesta test case so we can inspect it?
I have already submitted my siesta test case.
Whatever my code is there i.e. nothing but my siesta test case.

My problem is in that test case i wouldn't got any store data.

If you confuse with what exactly i want, then please help to write a test case from where i can fetch a store data in JSON format.

Post by jakub »

By test case we usually mean a simplified working example. Right now it's hard to say what's not loading, maybe there's something broken in the code you're trying to test and not siesta itself.
JavaScript/Angular/ExtJS consulting - kuba@virtualdesign.pl

Post Reply