Sha256: 4ee592ed82888eae2d9ee12b28f84cca50c2751b3f2baa102bc80a928a6d43e6

Contents?: true

Size: 1.46 KB

Versions: 30

Compression:

Stored size: 1.46 KB

Contents

// ==========================================================================
// Project:   SproutCore - JavaScript Application Framework
// Copyright: ©2006-2011 Strobe Inc. and contributors.
//            portions copyright @2011 Apple Inc.
// License:   Licensed under MIT license (see license.js)
// ==========================================================================

/*global module test htmlbody ok equals same stop start */

module('SC.Pane-SC.Page') ;

test("isVisible changes should update views that are instantiated in a page", function() {
  var page = SC.Page.design({
    inspector: SC.PickerPane.design({
      layout: { width: 300, height: 300, centerX: 0 },
      contentView: SC.View.extend({
        layout: { top: 0, left: 0, bottom: 0, right: 0 },
        childViews: 'labelView'.w(),

        labelView: SC.LabelView.extend({
          layout: { centerY: -10, height: 24, left: 0, right: 0 },
          value: "PrefPane"
        })
      })  
    })
  }) ;
  
  
  var pp = page.get('inspector');
  pp.append();
  SC.RunLoop.begin().end();
  pp.remove();
  SC.RunLoop.begin().end();
  pp.childViews[0].childViews[0].set('isVisible', NO);
  SC.RunLoop.begin().end();
  pp.append();
  SC.RunLoop.begin().end();
  var res = pp.childViews[0].childViews[0].$().hasClass('sc-hidden');
  ok(res, "The view (isVisible) has been properly rerendered even though it was part of a page, the pane was detached and the visibility was changed while detached");
 
  pp.remove(); 
});

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
sproutcore-1.9.2 lib/frameworks/sproutcore/frameworks/desktop/tests/panes/pane_page.js
sproutcore-1.9.1 lib/frameworks/sproutcore/frameworks/desktop/tests/panes/pane_page.js
sproutcore-1.9.0 lib/frameworks/sproutcore/frameworks/desktop/tests/panes/pane_page.js
sproutcore-1.8.2.1 lib/frameworks/sproutcore/frameworks/desktop/tests/panes/pane_page.js
sproutcore-1.8.1 lib/frameworks/sproutcore/frameworks/desktop/tests/panes/pane_page.js
sproutcore-1.8.0 lib/frameworks/sproutcore/frameworks/desktop/tests/panes/pane_page.js
sproutcore-1.7.1.beta-java lib/frameworks/sproutcore/frameworks/desktop/tests/panes/pane_page.js
sproutcore-1.7.1.beta lib/frameworks/sproutcore/frameworks/desktop/tests/panes/pane_page.js
sproutcore-1.6.0.1-java lib/frameworks/sproutcore/frameworks/desktop/tests/panes/pane_page.js
sproutcore-1.6.0.1 lib/frameworks/sproutcore/frameworks/desktop/tests/panes/pane_page.js
sproutcore-1.6.0.1-x86-mingw32 lib/frameworks/sproutcore/frameworks/desktop/tests/panes/pane_page.js
sproutcore-1.6.0 lib/frameworks/sproutcore/frameworks/desktop/tests/panes/pane_page.js
sproutcore-1.6.0-java lib/frameworks/sproutcore/frameworks/desktop/tests/panes/pane_page.js
sproutcore-1.6.0.rc.2-x86-mingw32 lib/frameworks/sproutcore/frameworks/desktop/tests/panes/pane_page.js
sproutcore-1.6.0.rc.2 lib/frameworks/sproutcore/frameworks/desktop/tests/panes/pane_page.js
sproutcore-1.6.0.rc.2-java lib/frameworks/sproutcore/frameworks/desktop/tests/panes/pane_page.js
sproutcore-1.6.0.rc.1-x86-mingw32 lib/frameworks/sproutcore/frameworks/desktop/tests/panes/pane_page.js
sproutcore-1.6.0.rc.1 lib/frameworks/sproutcore/frameworks/desktop/tests/panes/pane_page.js
sproutcore-1.6.0.rc.1-java lib/frameworks/sproutcore/frameworks/desktop/tests/panes/pane_page.js
sproutcore-1.6.0.beta.3-x86-mingw32 lib/frameworks/sproutcore/frameworks/desktop/tests/panes/pane_page.js