Sha256: ea377d11ae0d18197a126e69e1ed9e905aec8cd665d484e67a6e1e67fdf50aa0

Contents?: true

Size: 1.61 KB

Versions: 9

Compression:

Stored size: 1.61 KB

Contents

// ==========================================================================
// Project:   SproutCore - JavaScript Application Framework
// Copyright: ©2006-2011 Strobe Inc. and contributors.
//            ©2008-2011 Apple Inc. All rights reserved.
// License:   Licensed under MIT license (see license.js)
// ==========================================================================
// ========================================================================
// MainPane Unit Tests
// ========================================================================
/*globals module test ok isObj equals expects */

// ..........................................................
// BASE TESTS
//
// These tests exercise the API.  See below for tests that cover edge
// conditions.  If you find a bug, we recommend that you add a test in the
// edge case section.

(function() {
  var FRAME = { x: 10, y: 10, width: 30, height: 30 } ;

  var pane, view ; // test globals

  module('SC.MainPane', {
    setup: function() {
      pane = SC.MainPane.create();
    },

    teardown: function() {
      pane.remove();
      pane.destroy();
    }
  });

  test("should not be attached before calling append()", function() {
    equals(pane.get('isPaneAttached'), NO) ;
  });

  test("should attach when calling append()", function() {
    pane.append() ;
    equals(pane.get('isPaneAttached'), YES) ;
  });

  test("appending should make pane main & key", function() {
    pane.append();
    var r = pane.get('rootResponder');
    equals(r.get('mainPane'), pane, 'should become mainPane');
    equals(r.get('keyPane'), pane, 'should become keyPane');
  });
})();

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
sproutcore-1.11.0.rc2 lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/main_pane.js
sproutcore-1.11.0.rc1 lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/main_pane.js
sproutcore-1.10.3.1 lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/main_pane.js
sproutcore-1.10.2 lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/main_pane.js
sproutcore-1.10.1 lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/main_pane.js
sproutcore-1.10.0 lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/main_pane.js
sproutcore-1.10.0.rc.3 lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/main_pane.js
sproutcore-1.10.0.rc.2 lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/main_pane.js
sproutcore-1.10.0.rc.1 lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/main_pane.js