Sha256: 21b075ac1b8388276c350319addf249fcea30a65b9cdd9113ef847483d6cfdac

Contents?: true

Size: 1.43 KB

Versions: 7

Compression:

Stored size: 1.43 KB

Contents

// ==========================================================================
// Project:   SproutCore - JavaScript Application Framework
// Copyright: ©2006-2011 Strobe Inc. and contributors.
//            portions copyright @2009 Apple Inc.
// License:   Licensed 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({
    })
  });
  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.layoutStyle();

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

  //pane.remove();
}) ;

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
spade-0.0.1 sproutcore/frameworks/desktop/tests/panes/palette/ui.js
sproutcore-1.5.0.pre.5 lib/frameworks/sproutcore/frameworks/desktop/tests/panes/palette/ui.js
sproutcore-1.5.0.pre.4.1 lib/frameworks/sproutcore/frameworks/desktop/tests/panes/palette/ui.js
sproutcore-1.5.0.pre.4 lib/frameworks/sproutcore/frameworks/desktop/tests/panes/palette/ui.js
sproutcore-1.5.0.pre.3 lib/frameworks/sproutcore/frameworks/desktop/tests/panes/palette/ui.js
sproutcore-1.4.5 lib/frameworks/sproutcore/frameworks/desktop/tests/panes/palette/ui.js
sproutcore-1.4.5-java lib/frameworks/sproutcore/frameworks/desktop/tests/panes/palette/ui.js