thedersen
3 May 2011, 4:18 AM
Dear fellow Sencha Touch geeks,
I'm having some trouble with finding any examples of how to test Sencha Touch MVC with Jasmine. As a starter, I've used the example code from a SenchaCon presentation found here: https://twitter.com/#!/tmaintz/status/5370817298829312
By default, the application is stopped from being booted up automatically. This causes code like
this.application.viewport.setActiveItem(this.listPanel);
in the controller to fail, since viewport is not initialized before Application.launch is called.
Ext.regApplication('MyApp', {
defaultTarget: 'viewport',
defaultUrl: 'Login/index',
name: 'MyApp',
launch: function() {
this.viewport = new MyApp.Viewport({
application: this
});
}
});
If we enable booting of the application, the app is rendered in the test runner.
I'm wondering if there are any examples/best practices for how to test a Sencha Touch MVC application?
-Thomas
I'm having some trouble with finding any examples of how to test Sencha Touch MVC with Jasmine. As a starter, I've used the example code from a SenchaCon presentation found here: https://twitter.com/#!/tmaintz/status/5370817298829312
By default, the application is stopped from being booted up automatically. This causes code like
this.application.viewport.setActiveItem(this.listPanel);
in the controller to fail, since viewport is not initialized before Application.launch is called.
Ext.regApplication('MyApp', {
defaultTarget: 'viewport',
defaultUrl: 'Login/index',
name: 'MyApp',
launch: function() {
this.viewport = new MyApp.Viewport({
application: this
});
}
});
If we enable booting of the application, the app is rendered in the test runner.
I'm wondering if there are any examples/best practices for how to test a Sencha Touch MVC application?
-Thomas