Skip to content

Commit

Permalink
Merge pull request #72 from arthurakay/master
Browse files Browse the repository at this point in the history
Some additional tests
  • Loading branch information
arthurakay committed Apr 3, 2014
2 parents 72c25a3 + 8f24052 commit c8948b0
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 19 deletions.
3 changes: 2 additions & 1 deletion app/AppInspector/app.js
Expand Up @@ -22,7 +22,8 @@ Ext.Loader.setConfig({
Ext.application({

requires: [
'AI.util.i18n'
'AI.util.i18n',
'Ext.window.MessageBox'
],
controllers: [
'Main',
Expand Down
4 changes: 0 additions & 4 deletions app/AppInspector/app/util/Error.js
Expand Up @@ -4,10 +4,6 @@
Ext.define('AI.util.Error', {
singleton : true,

requires : [
'Ext.window.MessageBox'
],

/**
* @param {Object} exception
*/
Expand Down
3 changes: 2 additions & 1 deletion app/AppInspector/metadata/Application
Expand Up @@ -15,7 +15,8 @@
],
"name": "AI",
"requires": [
"AI.util.i18n"
"AI.util.i18n",
"Ext.window.MessageBox"
]
},
"designerId": "application"
Expand Down
4 changes: 2 additions & 2 deletions app/test/index.html
@@ -1,8 +1,8 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="http://sencha.local/_ext/ext-4.2.0/resources/css/ext-all.css">
<script type="text/javascript" src="http://sencha.local/_ext/ext-4.2.0/ext-all-debug.js"></script>
<link rel="stylesheet" type="text/css" href="http://cdn.sencha.com/ext/gpl/4.2.0/resources/css/ext-all.css">
<script type="text/javascript" src="http://cdn.sencha.com/ext/gpl/4.2.0/ext-all-debug.js"></script>

<link rel="stylesheet" type="text/css" href="siesta-2.0.5-lite/resources/css/siesta-all.css">
<script type="text/javascript" src="siesta-2.0.5-lite/siesta-all.js"></script>
Expand Down
9 changes: 7 additions & 2 deletions app/test/index.js
Expand Up @@ -22,14 +22,19 @@ Harness.start(
]
},

/**
* Ext JS 4 and 5 really ought to test the same page for consistency in the tests.
* However, Ext JS 5 GA isn't yet available, and for whatever reason the 4.2.1 example throws some console errors (but don't kill the tests)
*/
{
group : 'Ext JS 4',

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

hostPageUrl : 'http://sencha.local/_ext/ext-4.2.1.883/examples/personel-review/index.html',
//hostPageUrl : 'http://sencha.local/_ext/ext-4.2.1.883/examples/personel-review/index.html',
hostPageUrl : 'http://sencha.local/_ext/ext-4.2.1.883/examples/kitchensink/#basic-panels',

items : [
'specs/ext4/InspectedWindow.js',
Expand All @@ -45,7 +50,7 @@ Harness.start(
'AI' : '../AppInspector/app'
},

hostPageUrl : 'http://sencha.local/_ext/ext-5.0.0.470-pb2/examples/personel-review/index.html',
hostPageUrl : 'http://sencha.local/_ext/ext5-qa/ext/examples/kitchensink/#basic-panels',

items : [
'specs/ext5/InspectedWindow.js',
Expand Down
2 changes: 1 addition & 1 deletion app/test/specs/ext4/Component.js
Expand Up @@ -31,7 +31,7 @@ StartTest({
AI.util.Component.getInspectedComponent,

//id of component is specific to the example!
'mainviewport',
'app-header',

function(data, isException) {
test.isNot(data.methods, undefined, 'data.methods exists');
Expand Down
4 changes: 4 additions & 0 deletions app/test/specs/ext4/InspectedWindow.js
Expand Up @@ -6,6 +6,10 @@ StartTest({
]
}, function (test) {

if (!Ext.ux) {
Ext.ns('Ext.ux');
}

//=================================================================
test.diag("AI.util.InspectedWindow.getAppVersion()");
test.is(Ext.ux.AppInspector, undefined, 'Ext.ux.AppInspector is not yet defined.');
Expand Down
2 changes: 1 addition & 1 deletion app/test/specs/ext4/Store.js
Expand Up @@ -29,7 +29,7 @@ StartTest({
AI.util.Store.getRecords,

//id of store is specific to the example!
[ 'reviewStore', 0 ],
[ 'Restaurants', 0 ],

function(data, isException) {
//test the data object properties
Expand Down
2 changes: 1 addition & 1 deletion app/test/specs/ext5/Component.js
Expand Up @@ -31,7 +31,7 @@ StartTest({
AI.util.Component.getInspectedComponent,

//id of component is specific to the example!
'mainviewport',
'app-header',

function(data, isException) {
test.isNot(data.methods, undefined, 'data.methods exists');
Expand Down
6 changes: 5 additions & 1 deletion app/test/specs/ext5/InspectedWindow.js
Expand Up @@ -6,6 +6,10 @@ StartTest({
]
}, function (test) {

if (!Ext.ux) {
Ext.ns('Ext.ux');
}

//=================================================================
test.diag("AI.util.InspectedWindow.getAppVersion()");
test.is(Ext.ux.AppInspector, undefined, 'Ext.ux.AppInspector is not yet defined.');
Expand All @@ -18,7 +22,7 @@ StartTest({
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');
test.is(data.extjs, '5.0.0.700', 'Ext JS version is 5.0.0.700');
}
);
});
4 changes: 2 additions & 2 deletions app/test/specs/ext5/Store.js
Expand Up @@ -29,7 +29,7 @@ StartTest({
AI.util.Store.getRecords,

//id of store is specific to the example!
[ 'reviewStore', 0 ],
[ 'Restaurants', 0 ],

function(data, isException) {
//test the data object properties
Expand All @@ -41,7 +41,7 @@ StartTest({

test.isNot(rec.id, undefined, 'record.id exists');
test.isNot(rec.modelData, undefined, 'record.modelData exists');
test.isNot(rec.rawData, undefined, 'record.rawData exists');
test.is(rec.rawData, undefined, 'record.rawData does not exist! (Removed in Ext JS 5)');
}
);
});
8 changes: 6 additions & 2 deletions app/test/specs/touch/InspectedWindow.js
Expand Up @@ -6,6 +6,10 @@ StartTest({
]
}, function (test) {

if (!Ext.ux) {
Ext.ns('Ext.ux');
}

//=================================================================
test.diag("AI.util.InspectedWindow.getAppVersion()");
test.is(Ext.ux.AppInspector, undefined, 'Ext.ux.AppInspector is not yet defined.');
Expand All @@ -17,8 +21,8 @@ StartTest({

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');
test.isNot(data.touch, undefined, 'Framework is Touch');
test.is(data.touch, '2.3.1', 'Touch version is 2.3.1');
}
);
});
2 changes: 1 addition & 1 deletion app/test/specs/touch/Store.js
Expand Up @@ -29,7 +29,7 @@ StartTest({
AI.util.Store.getRecords,

//id of store is specific to the example!
[ 'List', 0 ],
[ 'ext-data-store-1', 0 ],

function(data, isException) {
//test the data object properties
Expand Down

0 comments on commit c8948b0

Please sign in to comment.