Sha256: d027f4646c05486014ee159e0b9554b970bf24bc4b11d3ed5ce5ff6456accfc2

Contents?: true

Size: 1.43 KB

Versions: 30

Compression:

Stored size: 1.43 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.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

30 entries across 30 versions & 1 rubygems

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