View Full Version : [FIXED] Ext.create is not a function

5 May 2016, 2:02 AM
I am trying to explore Sencha Test trial version before we go for it with our existing project (ExtJS 4.2.0), added a login page validation test, after running the test I am getting "Ext.create is not a function" error. What is missing here?

describe("formBind true", function() {
it("should disable button if email is not valid", function(done) {

// Create and reference the WindowEditor and then
// get reference to the button and textfield
var loginView = Ext.create('MyApp.view.LoginView'),
loginformview = loginView.down('loginformview'),
button = loginformview.down('button'),
field = loginformview.query('textfield'),
panelField = loginformview.query('combo');

// Set the field's value to a valid email address
// in order to have the button fire an enable event
field[0].setValue('User Name');

button.on('enable', function() {

// Set the field's value to an invalid email address (nothing)
// in order to have the button fire a disable event

button.on('disable', function() {

// Once the disable event has been called after setting a
// bad value, we can safely say that the button is properly
// hooked into the form's validity. Thusly, we can
// alert the spec to return by calling the done function.

ST Version:

9 May 2016, 2:57 AM
Since our code base is using Ext and Sencha CMD version to build the application, is there any restriction with this Sencha Test is not recognizing ithttps://www.sencha.com/forum/images/icons/icon5.png As it uses Sencha CMD Version 6+

On my system both the versions of Sencha CMDs are installed but ST doesn't have option to select version less than 6.

https://www.sencha.com/forum/images/icons/icon4.pnghttps://www.sencha.com/forum/images/icons/icon4.pngNeed your urgent attention on this before our trial version gets expires https://www.sencha.com/forum/images/icons/icon4.pnghttps://www.sencha.com/forum/images/icons/icon4.png

9 May 2016, 8:18 AM
Hi kakasab.havale,
try move your object initialize to block beforeAll(function(){ }) before block it();

SenchaTest is able test ExtJS frameworks version 4.2 and higher.
SenchaTest supports Cmd 6.x, but you can test remote app.

9 May 2016, 7:46 PM
Hi vojtech.cerveny,

Thanks for your reply, I tried creating like an application which is given in this below URL:


As per your suggestion tried moving the object creation before it block but still same issue.

describe("loginValidation", function() {
loginView = Ext.create('MyApp.view.LoginView') ;
it("should pass", function() {

10 May 2016, 12:20 AM
I think that problem is in sync in your code.

Try this - it() waits for executing beforeAll and beforeEach (not this case) and then run itself. So try put creating your object to beforeAll as I have. Look on doc http://jasmine.github.io/2.4/introduction.html#section-11 , I hope that will help.

describe('Some suite', function () {
beforeAll(function () {
Ext.create('Ext.Button', {
text: 'Click me',
renderTo: Ext.getBody(),
id: 'senchaButton'
it('some test', function () {

10 May 2016, 3:33 AM
Thanks vojtech.cerveny for your reply.

Looks like some problem in initializing ExtJS (Not very sure, is there anything I can try to check here?)

When I tried using your approach and ran the test then its keep on loading (running) for infinite times, even I tried with your code as well then also same loading issue!!!

When I try to refresh the Frameworks/Ext JS, i see there is some log getting generated which I have attached herewith, please find it.


Request your help in this regard to move further...

Thanks in Advance!!!

18 May 2016, 12:43 AM
Thanks for the report! I have opened a bug in our bug tracker.

19 May 2016, 2:46 AM
Good to know that you have fixed this in "1.0.2" version.

Can you please tell us by when we can get this version for download? As we are completely blocked and can't proceed without this fix....

19 May 2016, 4:25 AM
I don't know a date, maybe some developers can provide some date.Can you test your working app? It is not unittest, but still better than nothing :)