Sha256: 204a5efe7b2e528c6196cde28a22341fd2aaabe5698aff890835132ef6cd489d

Contents?: true

Size: 1.22 KB

Versions: 4

Compression:

Stored size: 1.22 KB

Contents

// ========================================================================
// 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();
    }
  });

  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

4 entries across 4 versions & 2 rubygems

Version Path
spade-0.0.1 sproutcore/frameworks/core_foundation/tests/views/main_pane.js
sproutcore-1.5.0.pre.5 lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/main_pane.js
sproutcore-1.5.0.pre.4.1 lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/main_pane.js
sproutcore-1.5.0.pre.4 lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/main_pane.js