Skip to content

Commit

Permalink
First ExtJS 4 unit test in place!
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurakay committed Mar 28, 2014
1 parent 2eff746 commit 36093bd
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 56 deletions.
74 changes: 36 additions & 38 deletions app/test/index.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,30 @@
var Harness = Siesta.Harness.Browser;

Harness.configure({
title : 'AppInspector Test Suite',
autoCheckGlobals : true,
preload : []
title : 'AppInspector Test Suite'
//autoCheckGlobals : true
});

Harness.start(
'specs/010_basic_assertions.t.js',

{
hostPageUrl : '../AppInspector/index.html',
url : 'specs/InspectedWindow.js'
},

{
group : 'Sencha Touch',

loaderPath : {
'AI' : '../AppInspector/app'
},

hostPageUrl : 'http://sencha.local/_touch/touch-2.3.1/examples/geocongress/index.html',

items : [
'specs/InspectedWindow.js'
]
},
//
// {
// hostPageUrl : '../AppInspector/index.html',
// url : 'specs/InspectedWindow.js'
// },
//
// {
// group : 'Sencha Touch',
//
// loaderPath : {
// 'AI' : '../AppInspector/app'
// },
//
// hostPageUrl : 'http://sencha.local/_touch/touch-2.3.1/examples/geocongress/index.html',
//
// items : [
// 'specs/InspectedWindow.js'
// ]
// },

{
group : 'Ext JS 4',
Expand All @@ -38,22 +36,22 @@ Harness.start(
hostPageUrl : 'http://sencha.local/_ext/ext-4.2.1.883/examples/themes/index.html',

items : [
'specs/InspectedWindow.js'
]
},

{
group : 'Ext JS 5',

loaderPath : {
'AI' : '../AppInspector/app'
},

hostPageUrl : 'http://sencha.local/_ext/ext-5.0.0.470-pb2/examples/themes/index.html',

items : [
'specs/InspectedWindow.js'
'specs/ext4/InspectedWindow.js'
]
}

// {
// group : 'Ext JS 5',
//
// loaderPath : {
// 'AI' : '../AppInspector/app'
// },
//
// hostPageUrl : 'http://sencha.local/_ext/ext-5.0.0.470-pb2/examples/themes/index.html',
//
// items : [
// 'specs/InspectedWindow.js'
// ]
// }
);

9 changes: 0 additions & 9 deletions app/test/specs/010_basic_assertions.t.js

This file was deleted.

9 changes: 0 additions & 9 deletions app/test/specs/InspectedWindow.js

This file was deleted.

24 changes: 24 additions & 0 deletions app/test/specs/ext4/InspectedWindow.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
StartTest({
preload : [
'../AppInspector/mocks.js',
'../AppInspector/app/util/Error.js',
'../AppInspector/app/util/InspectedWindow.js'
]
}, function (test) {

//=================================================================
test.diag("AI.util.InspectedWindow.getAppVersion()");
test.is(Ext.ux.AppInspector, undefined, 'Ext.ux.AppInspector is not yet defined.');

AI.util.InspectedWindow.eval(
AI.util.InspectedWindow.getAppVersion,
null,
function(data, isException) {

test.isNot(Ext.ux.AppInspector, undefined, 'Ext.ux.AppInspector is defined.');

test.isNot(data.extjs, undefined, 'Framework is Ext JS');
test.is(data.extjs, '4.2.1.883', 'Ext JS version is 4.2.1.883');
}
);
});

0 comments on commit 36093bd

Please sign in to comment.