PDA

View Full Version : ExtJS and Jasmine



akrillo
15 Oct 2014, 7:43 AM
Hello,

at the moment I try to get any tests running using Jasmine and ExtJs,

I got stucked at an initializing problem of my controller. Maybe you have an idea how to fix it.

At first I include all the Jasmine files. After I execute my Ext.onReady and Ext.application methods. At the end of the launch function of my Ext.Application definition I execute Jasmine.
After I try to get the view of my view definition:



describe('MyController component selectors', function() {
var view = new MyApp.example.view.schl.DialogV({ renderTo: Ext.getBody() }),


My View file looks like:


Ext.define('MyApp.example.view.schl.DialogV', {
extend : '...'


I also run my view with show() and the html looks flawless. Jasmine just tells me that


TypeError: Cannot read property 'view' of undefined at null

So MyApp is defined. But it can not find my view. Just my app is defined.

Any help is welcome!

kind regards

slemmon
17 Oct 2014, 11:05 PM
Hi,

The only guidance we have for Jasmine testing can be found here:
http://docs.sencha.com/extjs/4.2.3/#!/guide/testing