Sha256: f35cc601fe4b3d2142dd2d62dec1fdab8196fc9fe3245c0dfce14f70d8522ac4

Contents?: true

Size: 1.96 KB

Versions: 32

Compression:

Stored size: 1.96 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 Q$ */

var field;

/**
  Track the public functions and properties of the class.  This will serve as an early warning
  when functions that people may depend on disappear between versions to ensure that we don't
  break promised support without proper deprecations.
  
  tylerkeating: This is probably redundant since each of these functions and properties should
  be individually tested elsewhere.
*/
module("Test the public functions and properties of SC.InlineTextFieldView", {
  setup: function() {
    field = SC.InlineTextFieldView.create({});
  },

  teardown: function() {
    field = null;
  }
});


test("contains all public class functions",
function() {
  ok(SC.typeOf(SC.InlineTextFieldView['beginEditing']) === SC.T_FUNCTION, "should respond to beginEditing()");
  ok(SC.typeOf(SC.InlineTextFieldView['commitEditing']) === SC.T_FUNCTION, "should respond to commitEditing()");
  ok(SC.typeOf(SC.InlineTextFieldView['discardEditing']) === SC.T_FUNCTION, "should respond to discardEditing()");
});


test("contains all public functions",
function() {
  ok(field.respondsTo('beginEditing'), "should respond to beginEditing()");
  ok(field.respondsTo('commitEditing'), "should respond to commitEditing()");
  ok(field.respondsTo('discardEditing'), "should respond to discardEditing()");
  ok(field.respondsTo('blurEditor'), "should respond to blurEditor()");
  ok(field.respondsTo('cancel'), "should respond to cancel()");
});


test("contains all public properties",
function() {
  ok(field.get('isEditing') !== undefined, "should have isEditing property");
});

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
sproutcore-1.10.0.rc.2 lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/api.js
sproutcore-1.10.0.rc.1 lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/api.js
sproutcore-1.9.2 lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/api.js
sproutcore-1.9.1 lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/api.js
sproutcore-1.9.0 lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/api.js
sproutcore-1.8.2.1 lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/api.js
sproutcore-1.8.1 lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/api.js
sproutcore-1.8.0 lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/api.js
sproutcore-1.7.1.beta-java lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/api.js
sproutcore-1.7.1.beta lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/api.js
sproutcore-1.6.0.1-java lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/api.js
sproutcore-1.6.0.1 lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/api.js
sproutcore-1.6.0.1-x86-mingw32 lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/api.js
sproutcore-1.6.0 lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/api.js
sproutcore-1.6.0-java lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/api.js
sproutcore-1.6.0.rc.2-x86-mingw32 lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/api.js
sproutcore-1.6.0.rc.2 lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/api.js
sproutcore-1.6.0.rc.2-java lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/api.js
sproutcore-1.6.0.rc.1-x86-mingw32 lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/api.js
sproutcore-1.6.0.rc.1 lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/api.js