widget-stdmod-test.js revision f386d69afd040f61944cff1eaad6cf615c147a6d
624675c154cbb5186e8c760b853ca79835987c9eEric Ferraiuolo// -- Suite --------------------------------------------------------------------
624675c154cbb5186e8c760b853ca79835987c9eEric FerraiuoloTestWidget = Y.Base.create('testWidget', Y.Widget, [Y.WidgetStdMod]);
624675c154cbb5186e8c760b853ca79835987c9eEric Ferraiuolo// -- Lifecycle ----------------------------------------------------------------
624675c154cbb5186e8c760b853ca79835987c9eEric Ferraiuolo tearDown: function () {
624675c154cbb5186e8c760b853ca79835987c9eEric Ferraiuolo 'WidgetStdMod should add a `fillHeight` attribute': function () {
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.');
624675c154cbb5186e8c760b853ca79835987c9eEric Ferraiuolo}, '@VERSION@', {