9dc7f0d44274115d9742ccaebf0ca735ddc68885Eric FerraiuoloYUI.add('widget-position-test', function (Y) {
9dc7f0d44274115d9742ccaebf0ca735ddc68885Eric Ferraiuolo// -- Suite --------------------------------------------------------------------
9dc7f0d44274115d9742ccaebf0ca735ddc68885Eric FerraiuoloTestWidget = Y.Base.create('testWidget', Y.Widget, [Y.WidgetPosition]);
9dc7f0d44274115d9742ccaebf0ca735ddc68885Eric Ferraiuolo// -- Lifecycle ----------------------------------------------------------------
9dc7f0d44274115d9742ccaebf0ca735ddc68885Eric Ferraiuolo tearDown: function () {
ea66fc748b0c20e20bc3d09027ca29151e95ce39Eric Ferraiuolo 'WidgetPosition should add `x`, `y`, and `xy` attributes': function () {
ea66fc748b0c20e20bc3d09027ca29151e95ce39Eric Ferraiuolo Assert.areSame(0, this.widget.get('x'), '`x` is not 0.');
ea66fc748b0c20e20bc3d09027ca29151e95ce39Eric Ferraiuolo Assert.areSame(0, this.widget.get('y'), '`y` is not 0.');
9dc7f0d44274115d9742ccaebf0ca735ddc68885Eric Ferraiuolo Assert.isArray(this.widget.get('xy'), '`xy` is not an Array.');
ea66fc748b0c20e20bc3d09027ca29151e95ce39Eric Ferraiuolo '`move()` should move the widget to the new `xy`': function () {
ea66fc748b0c20e20bc3d09027ca29151e95ce39Eric Ferraiuolo Assert.areSame(0, this.widget.get('x'), '`x` is not 0.');
ea66fc748b0c20e20bc3d09027ca29151e95ce39Eric Ferraiuolo Assert.areSame(0, this.widget.get('y'), '`y` is not 0.');
ea66fc748b0c20e20bc3d09027ca29151e95ce39Eric Ferraiuolo Assert.areSame(10, this.widget.get('x'), '`x` is not 0.');
ea66fc748b0c20e20bc3d09027ca29151e95ce39Eric Ferraiuolo Assert.areSame(10, this.widget.get('y'), '`y` is not 0.');
ea66fc748b0c20e20bc3d09027ca29151e95ce39Eric Ferraiuolo Assert.areSame(20, this.widget.get('x'), '`x` is not 0.');
ea66fc748b0c20e20bc3d09027ca29151e95ce39Eric Ferraiuolo Assert.areSame(20, this.widget.get('y'), '`y` is not 0.');
9dc7f0d44274115d9742ccaebf0ca735ddc68885Eric Ferraiuolo}, '@VERSION@', {