unit-tests.html revision 84765788c559bfdead67172a79759ac60c77231b
0N/A filter: (window.location.search.match(/[?&]filter=([^&]+)/) || [])[1] || 'min',
0N/A ARRAYASSERT = Y.ArrayAssert,
0N/A BTNRUN.set("disabled", false);
0N/A var testBasic = new Y.Test.Case({
0N/A this.panel = null;
0N/A delete this.panel;
0N/A mask.remove();
0N/A var bb = this.panel.get('boundingBox');
0N/A var buttons = this.panel.get('buttons');
4638N/A Y.Assert.areEqual(buttons[0].type, "close");
var mask = Y.one('.yui3-widget-mask');
Y.Assert.isNull(mask);
var bb = this.panel.get('boundingBox');
var buttons = this.panel.get('buttons');
var hd = Y.one('#panelContent .yui3-widget-hd');
Y.Assert.areEqual(buttons[0].type, "close");
var mask = Y.one('.yui3-widget-mask');
Y.log('hd button1 clicked');
section: Y.WidgetStdMod.HEADER
Y.log('hd button2 clicked');
var bb = this.panel.get('boundingBox');
var buttons = this.panel.get('buttons');
var hd = Y.one('#panelContent .yui3-widget-hd');
var wrap = Y.one('#panelContent .yui3-widget-hd .yui3-widget-button-wrapper');
var btns = Y.all('.yui3-button');
Y.Assert.isUndefined(buttons[0].type);
var mask = Y.one('.yui3-widget-mask');
Y.Assert.isNull(mask);
Y.log('ft button1 clicked');
section: Y.WidgetStdMod.FOOTER
Y.log('ft button2 clicked');
var bb = this.panel.get('boundingBox');
var buttons = this.panel.get('buttons');
var hd = Y.one('#panelContent .yui3-widget-hd');
var ft = Y.one('#panelContent .yui3-widget-ft');
var wrap = Y.one('#panelContent .yui3-widget-ft .yui3-widget-button-wrapper');
var btns = Y.all('.yui3-button');
var btnspan = Y.all('.yui3-button-content');
Y.Assert.isUndefined(buttons[0].type);
Y.Assert.isNull(hd);
var mask = Y.one('.yui3-widget-mask');
Y.Assert.isNull(mask);
var bb = this.panel.get('boundingBox');
var buttons = this.panel.get('buttons');
var hd = Y.one('#panelContent .yui3-widget-hd');
var ft = Y.one('#panelContent .yui3-widget-ft');
var wrap = Y.one('#panelContent .yui3-widget-ft .yui3-widget-button-wrapper');
var btns = Y.all('.yui3-button');
var btnspan = Y.all('.yui3-button-content');
Y.Assert.areEqual(buttons[0].type, "close");
Y.Assert.isNull(ft);
Y.log('ft button1 clicked');
section: Y.WidgetStdMod.FOOTER
ft = Y.one('#panelContent .yui3-widget-ft');
btns = Y.all('.yui3-button');
btnspan = Y.all('.yui3-button-content');
hd = Y.one('#panelContent .yui3-widget-hd');
ft = Y.one('#panelContent .yui3-widget-ft');
btns = Y.all('.yui3-button');
btnspan = Y.all('.yui3-button-content');
Y.Assert.areEqual(btnspan.item(2).getContent(), "ft button 1"); //the last one should be the footer since the first 2 are the header [x] buttons
var mask = Y.one('.yui3-widget-mask');
// var rs = new Y.Recordset(),
// rs.on('remove', function(e) {
// rem = e.removed;
// rs.add({a:1, b:2, c:3});
// rs.add([{a:'hey', b:'yo', c:'hi!'}, {a:2, b:5, c:6}]);
// rs.remove(2);
// Y.ObjectAssert.areEqual(rem[0].getValue(), {a:2, b:5, c:6});
// //this.rs.get('records');
// // var newrs = new Y.Recordset({records: [{a:10,b:10,c:10}]});
// // newrs.get('records');
// newRecord1 = this.rs.getRecordByIndex(1);
// newRecord2 = this.rs.getRecord(1);
// Y.ObjectAssert.areEqual(newRecord1, newRecord2);
// newRecord = this.rs.getRecordsByIndex(1,2);
// id = this.rs.getRecordByIndex(0).get('id');
// newRecord = this.rs.getRecord(id);
var suite = new Y.Test.Suite({name:"Panel Test Suite"});
suite.add(testBasic);
Y.Test.Runner.setName("Panel Test Runner");
Y.Test.Runner.add(suite);