Sha256: f1cc6c6dad677927d418f15ad8f5a2e9bd654bbb9178d756b922e94057814090

Contents?: true

Size: 1.64 KB

Versions: 30

Compression:

Stored size: 1.64 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.SheetPane UI");

var slidePane;

test("verify sheet pane slide down works", function() { 
  slidePane = SC.SheetPane.create({
    layout: { top: 60, width: 400, height: 200, centerX: 0 },
    contentView: SC.LabelView.extend({
      escapeHTML: NO,
      value: '<h1>Slide Down!</h1>'
    })
  });
  
  var layout = slidePane.get('layout');
  var pt = layout.top;
  var pl = layout.left;
  var pw = layout.width;
  var ph = layout.height;
  var ret = slidePane.layoutStyle();

  slidePane.append();
  var f = function() {
    // make sure all fo the timers have had an opportunity to fire
    SC.RunLoop.begin().end();
    equals(slidePane.get('layout').top, 0, 'pane should be displayed at default position top after animating');
    ok(slidePane.get('isVisibleInWindow'), 'pane.isVisibleInWindow should be YES');
    ok(slidePane.$().hasClass('sc-sheet'), 'pane should have sc-sheet class');
    ok(slidePane.childViews[0].get('isVisibleInWindow'), 'pane.div.isVisibleInWindow should be YES');
    ok(slidePane.childViews[0].$().hasClass('sc-view'), 'pane.div should have sc-view class');
    SC.RunLoop.begin();
    slidePane.remove();
    SC.RunLoop.end();
    window.start();
  };
  stop();
  setTimeout(f, 400);
}) ;

Version data entries

30 entries across 30 versions & 1 rubygems

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