StartTest(function(t) {
t.diag("Some class");
t.wait('require');
Ext.require('Ext.ux.some.Class',function(){
t.endWait('require');
//tests...
});
Support Forum
In my test of a util class, I am calling Ext.require to load the class before testing. The results indicated that I am adding assertions after the test has finished. If I add t.wait/endWait to the test, the assertion warning is removed. Is there a better (less verbose) way to require a class?
How so? It should work with the code you posted.zombeerose wrote:If I add t.wait/endWait to the test, the assertion warning is removed.
How about this in the ExtJS assertions pack?:zombeerose wrote: Is there a better (less verbose) way to require a class?
t.requireOk("Class1", "Class2", function () {
...
})
Read the API documentation
@mats - could work but it has 2 drawbacks for me: a) the include path will be rather long, which is why I make use of the Ext.Loader and b) I would like to keep references to my classes isolated to the test file thereby avoiding having to keep the includes defined in the index file in sync with the usage defined in the test file.
@support_team - just to clarify, the code I posted (with wait/endWait) does work. I'm looking for a shorter solution if possible. So with that in mind, "t.requireOk" would be awesome! I don't see that in the API so I am assuming that would be new.
Thanks !
@support_team - just to clarify, the code I posted (with wait/endWait) does work. I'm looking for a shorter solution if possible. So with that in mind, "t.requireOk" would be awesome! I don't see that in the API so I am assuming that would be new.
Thanks !
Yup, its going to be a new assertion in ExtJS layer, scheduled for 1.0.4 I think.
Read the API documentation