Skip to content

Commit

Permalink
Migrating test results into JSON data in data.js used by DataTable re…
Browse files Browse the repository at this point in the history
…ndered in tests/index.html. First steps. There will be links and detail added to the table in time, subsuming test_results.txt.
  • Loading branch information
lsmith committed Jul 22, 2009
1 parent fa56669 commit b21f24d
Show file tree
Hide file tree
Showing 2 changed files with 306 additions and 2 deletions.
275 changes: 275 additions & 0 deletions tests/data.js
@@ -0,0 +1,275 @@
YAHOO.namespace('caja').data = [
{ module:'yahoo',
cajoled: true, yuitest: true, examples: 6, tests : [16,6,0],
files: {
yuitest: 'test=yahoo',
tests: {
"Core test (events, lang, etc)": "suffix=gadget&test=core"
},
examples: { }
}
},
{ module:'dom',
cajoled: true, yuitest: true, examples: 6, tests : [31,1,0],
files: {
yuitest: 'test=dom',
}
},
{ module:'event',
cajoled: true, yuitest: false, examples: 3, tests : [0,0,0],
files: {
tests: {
"Core test (events, lang, etc)": "suffix=gadget&test=core"
},
examples: {
'Event basics' : 'suffix=example&test=eventsimple',
'Custom events' : 'suffix=example&test=custom-event',
'Event delegation' : 'suffix=example&test=event-delegation'
}
}
},
{ module:'selector',
cajoled: true, yuitest: true, examples: 2, tests : [4,8,0],
files: {
yuitest: 'test=selector',
}
},
{ module:'yahoo-dom-event',
cajoled: true, yuitest: false, examples: 0, tests : [0,0,0], files: { }
},
{ module:'utilities',
cajoled: true, yuitest: true, examples: 0, tests : [0,0,0],
files: {
tests: {
"Core test (events, lang, etc)": "suffix=gadget&test=core"
},
examples: { }
}
},
{ module:'connection',
cajoled: true, yuitest: true, examples: 6, tests : [0,0,1],
files: {
yuitest: 'test=connection',
tests: {
'Basic asyncRequest' : 'suffix=gadget&test=connection'
},
examples: {
GET: 'suffix=gadget&test=get',
POST: 'suffix=gadget&test=post',
abort: 'suffix=gadget&test=abort',
'Weather feed': 'suffix=gadget&test=weather',
'Global custom events': 'suffix=gadget&test=global_customevents',
'Callback custom events': 'suffix=gadget&test=callback_customevents'
}
}
},
{ module:'dragdrop',
cajoled: true, yuitest: true, examples: 9, tests : [5,3,0],
files: {
yuitest: 'test=dd'
}
},
{ module:'animation',
cajoled: true, yuitest: true, examples: 10, tests : [5,0,0],
files: {
yuitest: 'test=animation'
}
},
{ module:'datasource',
cajoled: true, yuitest: true, examples: 1, tests : [12,3,0],
files: {
yuitest: 'test=datasource'
}
},
{ module:'element',
cajoled: true, yuitest: true, examples: 0, tests : [11,2,0],
files: {
yuitest: 'test=element'
}
},
{ module:'yuitest',
cajoled: 'custom', yuitest: true, examples: 5, tests : [49,0,68],
files: {
yuitest: 'test=yuitest',
tests: {
'Simple suite to test that YUI Test cajoles': 'suffix=gadget&test=yuitest'
}
}
},
{ module:'cookie',
cajoled: true, yuitest: true, examples: 3, tests : [137,31,0],
files: {
yuitest: 'test=cookie'
}
},
{ module:'profiler',
cajoled: true, yuitest: true, examples: 2, tests : [13,0,1],
files: {
yuitest: 'test=profiler'
}
},
{ module:'imageloader',
cajoled: true, yuitest: 'error', examples: 4, tests : [0,0,0],
files: {
yuitest: 'test=imageloader'
}
},
{ module:'autocomplete',
cajoled: true, yuitest: true, examples: 12, tests : [14,1,0],
files: {
yuitest: 'include=datasource&test=autocomplete',
examples: {
'From local array': 'suffix=example&include=data,datasource,autocomplete&test=autocomplete_basic_array'
}
}
},
{ module:'menu',
cajoled: true, yuitest: true, examples: 26, tests : [0,0,1],
files: {
yuitest: 'include=container&test=menu'
}
},
{ module:'tabview',
cajoled: true, yuitest: true, examples: 7, tests : [8,0,0],
files: {
yuitest: 'test=tabview'
}
},
{ module:'slider',
cajoled: true, yuitest: false, examples: 6, tests : [0,0,0],
files: {
tests: {
'Basic start/end reporting':'test=slider'
}
}
},
{ module:'container',
cajoled: true, yuitest: true, examples: 15, tests : [12,1,0],
files: {
yuitest: 'include=container&test=module',
tests: {
'util.Config YUI Test suite': 'include=container&test=config'
}
}
},
{ module:'calendar', // Many errors that triggered the stop on 'debugger'
cajoled: true, yuitest: true, examples: 14, tests : [57,4,0],
files: {
yuitest: 'test=calendar',
tests: {
'DateMath YUI Test suite': 'include=calendar&test=datemath'
}
}
},
{ module:'colorpicker',
cajoled: true, yuitest: true, examples: 4, tests : [4,0,2],
files: {
yuitest: 'include=dragdrop,slider&test=colorpicker'
}
},
{ module:'paginator',
cajoled: true, yuitest: true, examples: 4, tests : [7,0,0],
files: {
yuitest: 'test=paginator'
}
},

/// STOPPED HERE

{ module:'button',
cajoled: true, yuitest: true, examples: 0, tests : [0,0,0],
files: {
yuitest: 'test=',
tests: { },
examples: { }
}
},
{ module:'layout',
cajoled: true, yuitest: true, examples: 0, tests : [0,0,0],
files: {
yuitest: 'test=',
tests: { },
examples: { }
}
},
{ module:'datatable',
cajoled: true, yuitest: true, examples: 0, tests : [0,0,0],
files: {
yuitest: 'test=',
tests: { },
examples: { }
}
},
{ module:'editor',
cajoled: true, yuitest: true, examples: 0, tests : [0,0,0],
files: {
yuitest: 'test=',
tests: { },
examples: { }
}
},
{ module:'treeview',
cajoled: true, yuitest: true, examples: 0, tests : [0,0,0],
files: {
yuitest: 'test=',
tests: { },
examples: { }
}
},
{ module:'uploader',
cajoled: true, yuitest: true, examples: 0, tests : [0,0,0],
files: {
yuitest: 'test=',
tests: { },
examples: { }
}
},
{ module:'imagecropper',
cajoled: true, yuitest: true, examples: 0, tests : [0,0,0],
files: {
yuitest: 'test=',
tests: { },
examples: { }
}
},
{ module:'charts',
cajoled: true, yuitest: true, examples: 0, tests : [0,0,0],
files: {
yuitest: 'test=',
tests: { },
examples: { }
}
},
{ module:'history',
cajoled: true, yuitest: true, examples: 0, tests : [0,0,0],
files: {
yuitest: 'test=',
tests: { },
examples: { }
}
},
{ module:'json',
cajoled: true, yuitest: true, examples: 0, tests : [0,0,0],
files: {
yuitest: 'test=',
tests: { },
examples: { }
}
},
{ module:'logger',
cajoled: true, yuitest: true, examples: 0, tests : [0,0,0],
files: {
yuitest: 'test=',
tests: { },
examples: { }
}
},
{ module:'stylesheet',
cajoled: true, yuitest: true, examples: 0, tests : [0,0,0],
files: {
yuitest: 'test=',
tests: { },
examples: { }
}
}
];
33 changes: 31 additions & 2 deletions tests/index.php
Expand Up @@ -44,7 +44,7 @@
'Connection Mgr POST' => array('test' => 'post'),
'Connection Mgr abort' => array('test' => 'abort'),
'Connection Mgr global custom events' => array('test' => 'global_customevents'),
'Connection Mgr callback cutsom events' => array('test' => 'callback_customevents'),
'Connection Mgr callback custom events' => array('test' => 'callback_customevents'),
'Connection Mgr Weather RSS feed' => array('test' => 'weather'),
'Event basics' => array('test' => 'eventsimple'),
'Event Custom events' => array('test' => 'custom-event'),
Expand All @@ -71,6 +71,7 @@ function buildLink($item,$suffix='') {
<html>
<head>
<title>Directory</title>
<link type="text/css" rel="stylesheet" href="../../yui2/build/datatable/assets/skins/sam/datatable.css">
<style type="text/css">
body {
font: normal 83%/1.4 Arial, sans-serif;
Expand All @@ -94,9 +95,12 @@ function buildLink($item,$suffix='') {
margin: 1em 0 0 20px;
padding: 0;
}
#tbl {
margin: 1em 0 0 20px;
}
</style>
</head>
<body>
<body class="yui-skin-sam">
<form action="">
<div>
<label for="base">Caja base:</label>
Expand All @@ -105,6 +109,7 @@ function buildLink($item,$suffix='') {
</div>
</form>
<h2>YUITest suites</h2>
<div id="details"></div>
<ul>
<?php
foreach ($yuitests as $label=>$item) {
Expand All @@ -128,5 +133,29 @@ function buildLink($item,$suffix='') {
}
?>
</ul>
<h2>Status</h2>
<div id="tbl"></div>
<script type="text/javascript" src="http://yui.yahooapis.com/combo?2.7.0/build/yahoo-dom-event/yahoo-dom-event.js&2.7.0/build/element/element-min.js&2.7.0/build/datasource/datasource-min.js&2.7.0/build/datatable/datatable-min.js"></script>
<script src="../../yui2/build/yahoo-dom-event/yahoo-dom-event.js"></script>
<script src="../../yui2/build/element/element-min.js"></script>
<script src="../../yui2/build/datasource/datasource-min.js"></script>
<script src="../../yui2/build/datatable/datatable-min.js"></script>
<script src="data.js"></script>
<script>
new YAHOO.widget.DataTable('tbl',[
{ key: 'module' },
{ key: 'yuitest' },
{ key: 'examples' },
{ label: 'test results', children: [
{ key: 'tests', label: 'pass', formatter: function (cell,row,col,data) { cell.innerHTML = data[0]; } },
{ key: 'tests', label: 'fail', formatter: function (cell,row,col,data) { cell.innerHTML = data[1]; } },
{ key: 'tests', label: 'error', formatter: function (cell,row,col,data) { cell.innerHTML = data[2]; } }
]}],
new YAHOO.util.LocalDataSource(YAHOO.caja.data, {
responseType: YAHOO.util.DataSource.TYPE_JSARRAY,
responseSchema: {
fields: ['module','yuitest','examples','tests']
}}));
</script>
</body>
</html>

0 comments on commit b21f24d

Please sign in to comment.