624675c154cbb5186e8c760b853ca79835987c9eEric Ferraiuolo// -- Suite --------------------------------------------------------------------
624675c154cbb5186e8c760b853ca79835987c9eEric FerraiuoloTestWidget = Y.Base.create('testWidget', Y.Widget, [Y.WidgetStdMod]);
624675c154cbb5186e8c760b853ca79835987c9eEric Ferraiuolo// -- Lifecycle ----------------------------------------------------------------
624675c154cbb5186e8c760b853ca79835987c9eEric Ferraiuolo tearDown: function () {
039c1e71e8a73e299b06634cb4a9897393179cf2Eric Ferraiuolo 'WidgetStdMod should add `headerContent`, `bodyContent`, `footerContent`, and `fillHeight` attributes': function () {
039c1e71e8a73e299b06634cb4a9897393179cf2Eric Ferraiuolo Assert.areSame('foo', this.widget.get('headerContent').item(0).get('text'), '`headerContent` is not "foo".');
039c1e71e8a73e299b06634cb4a9897393179cf2Eric Ferraiuolo Assert.areSame('bar', this.widget.get('bodyContent').item(0).get('text'), '`bodyContent` is not "bar".');
039c1e71e8a73e299b06634cb4a9897393179cf2Eric Ferraiuolo Assert.areSame('baz', this.widget.get('footerContent').item(0).get('text'), '`footerContent` is not "baz".');
624675c154cbb5186e8c760b853ca79835987c9eEric Ferraiuolo Assert.areSame('body', this.widget.get('fillHeight'), '`fillHeight` is not "body".');
f386d69afd040f61944cff1eaad6cf615c147a6dEric Ferraiuolo// -- Methods ------------------------------------------------------------------
f386d69afd040f61944cff1eaad6cf615c147a6dEric Ferraiuolo tearDown: function () {
f386d69afd040f61944cff1eaad6cf615c147a6dEric Ferraiuolo 'getStdModNode() should return the section node if there is content': function () {
f386d69afd040f61944cff1eaad6cf615c147a6dEric Ferraiuolo this.widget = new TestWidget({render: '#test'});
f386d69afd040f61944cff1eaad6cf615c147a6dEric Ferraiuolo Assert.isNull(this.widget.getStdModNode('header'), 'Header node was not null.');
f386d69afd040f61944cff1eaad6cf615c147a6dEric Ferraiuolo Assert.isNotNull(this.widget.getStdModNode('header'), 'Header node was null.');
f386d69afd040f61944cff1eaad6cf615c147a6dEric Ferraiuolo 'getStdModNode() should create the section node when `forceCreate` is truthy': function () {
f386d69afd040f61944cff1eaad6cf615c147a6dEric Ferraiuolo this.widget = new TestWidget({render: '#test'});
f386d69afd040f61944cff1eaad6cf615c147a6dEric Ferraiuolo Assert.isNull(this.widget.getStdModNode('header'), 'Header node was not null.');
f386d69afd040f61944cff1eaad6cf615c147a6dEric Ferraiuolo Assert.isNotNull(this.widget.getStdModNode('header', true), 'Header node was null.');
039c1e71e8a73e299b06634cb4a9897393179cf2Eric Ferraiuolo 'fillHeight() should fill the a widget height using the provided node': function () {
039c1e71e8a73e299b06634cb4a9897393179cf2Eric Ferraiuolo header = this.widget.getStdModNode('header');
039c1e71e8a73e299b06634cb4a9897393179cf2Eric Ferraiuolo Assert.areSame('200px', bb.getStyle('height'), 'widget is not 200px in height.');
039c1e71e8a73e299b06634cb4a9897393179cf2Eric Ferraiuolo Assert.areNotSame('200px', header.getStyle('height'), 'header is 200px in height.');
039c1e71e8a73e299b06634cb4a9897393179cf2Eric Ferraiuolo Assert.areSame('200px', bb.getStyle('height'), 'widget is not 200px in height.');
039c1e71e8a73e299b06634cb4a9897393179cf2Eric Ferraiuolo Assert.areSame('200px', header.getStyle('height'), 'header is not 200px in height.');
624675c154cbb5186e8c760b853ca79835987c9eEric Ferraiuolo}, '@VERSION@', {