Sha256: 6dc82188c8486f68aa2d689ad64268deaa18979210f745e6382d82fbb8059e2b

Contents?: true

Size: 1.53 KB

Versions: 2

Compression:

Stored size: 1.53 KB

Contents

// ==========================================================================
// Project:   SproutCore - JavaScript Application Framework
// Copyright: ©2006-2009 Sprout Systems, Inc. and contributors.
//            portions copyright @2009 Apple, Inc.
// License:   Licened under MIT license (see license.js)
// ==========================================================================

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

module("SC.PalettePane UI");

var pane ;

test("verify palette pane content container is visible at correct location with right size", function() { 
  pane = SC.PalettePane.create({
    layout: { width: 400, height: 200, right: 20, top: 0 },
    contentView: SC.View.extend({
      layout: { width: 400, height: 200, right: 0, top: 0 }
    })
  });
  pane.append();

  ok(pane.get('isVisibleInWindow'), 'pane.isVisibleInWindow should be YES');
  ok(pane.$().hasClass('sc-palette'), 'pane should have sc-palette class');
  ok(pane.childViews[0].get('isVisibleInWindow'), 'pane.div.isVisibleInWindow should be YES');
  ok(pane.childViews[0].$().hasClass('sc-view'), 'pane.div should have sc-view class');
  
  var ret = pane.childViews[0].layoutStyle();

  equals(ret.top, '0px', 'pane.div should be initiated at default position top including shadow');
  equals(ret.right, '0px', 'pane.div should be initiated at default position right including shadow');
  equals(ret.width, '400px', 'pane.div should have width 400px');
  equals(ret.height, '200px', 'pane.div should have height 200px');

  //pane.remove();
}) ;

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sproutit-sproutcore-1.0.0.20090408130025 frameworks/sproutcore/frameworks/desktop/tests/panes/palette/ui.js
sproutit-sproutcore-1.0.0.20090416161445 frameworks/sproutcore/frameworks/desktop/tests/panes/palette/ui.js