2f0d5a8bc2c94864389d6ba0d6f01483302e43bdMatt Sweeney 'should return the selected tab': function() {
2f0d5a8bc2c94864389d6ba0d6f01483302e43bdMatt Sweeney Y.Assert.areEqual(0, tabview.get('selection').get('index'));
2f0d5a8bc2c94864389d6ba0d6f01483302e43bdMatt Sweeney 'should update the selected tab': function() {
2f0d5a8bc2c94864389d6ba0d6f01483302e43bdMatt Sweeney Y.Assert.areEqual(1, tabview.get('selection').get('index'));
2f0d5a8bc2c94864389d6ba0d6f01483302e43bdMatt Sweeney Y.Assert.areEqual(0, tabview.get('selection').get('index'));
2f0d5a8bc2c94864389d6ba0d6f01483302e43bdMatt Sweeney 'should fire selection change': function() {
2f0d5a8bc2c94864389d6ba0d6f01483302e43bdMatt Sweeney 'should add the new tab to the tabview': function() {
2f0d5a8bc2c94864389d6ba0d6f01483302e43bdMatt Sweeney var tab = new Y.Tab({ label: 'new tab', content: 'new tab content' }),
2f0d5a8bc2c94864389d6ba0d6f01483302e43bdMatt Sweeney 'should remove the selected tab': function() {
2f0d5a8bc2c94864389d6ba0d6f01483302e43bdMatt Sweeney Y.Assert.areEqual(0, tabview.get('selection').get('index'));
2f0d5a8bc2c94864389d6ba0d6f01483302e43bdMatt Sweeney Y.Assert.areEqual(1, tabview.get('selection').get('index'));
2f0d5a8bc2c94864389d6ba0d6f01483302e43bdMatt Sweeney 'should fire selectionChange event': function() {
2f0d5a8bc2c94864389d6ba0d6f01483302e43bdMatt Sweeney var pass = false;
2f0d5a8bc2c94864389d6ba0d6f01483302e43bdMatt Sweeney tabview.on('selectionChange', function() { pass = true; });
2f0d5a8bc2c94864389d6ba0d6f01483302e43bdMatt Sweeney 'should set the label': function() {
2f0d5a8bc2c94864389d6ba0d6f01483302e43bdMatt Sweeney Y.Assert.areEqual('new label', tab.get('label'));
2f0d5a8bc2c94864389d6ba0d6f01483302e43bdMatt Sweeney Y.Assert.areEqual('new label', tab.get('contentBox').get('text'));
2f0d5a8bc2c94864389d6ba0d6f01483302e43bdMatt Sweeney 'should set the label': function() {
2f0d5a8bc2c94864389d6ba0d6f01483302e43bdMatt Sweeney Y.Assert.areEqual('new content', tab.get('content'));
2f0d5a8bc2c94864389d6ba0d6f01483302e43bdMatt Sweeney Y.Assert.areEqual('new content', tab.get('panelNode').get('text'));
2f0d5a8bc2c94864389d6ba0d6f01483302e43bdMatt Sweeney}, '@VERSION@' ,{requires:['tabview', 'test']});