Class: SC.ControlTestPane
Extends
SC.Pane.
Generates a pane that will display vertically stacked views for testing. You can use this class in test mode to easily create a palette with views configured in different ways.
Example
var pane = SC.ControlTestPane.design()
.add('basic', SC.CheckboxView.design({ title: "Hello World" }))
.add('disabled', SC.CheckboxView.design({
title: "Hello World", isEnabled: NO
}));
module("CheckboxView UI", pane);
test("basic", function() {
var view = pane.view('basic');
ok(view.get('isEnabled'), 'should be enabled');
});
Defined in: control_test_pane.js
- Since:
- SproutCore 1.0
Field Summary
- Fields borrowed from SC.Pane:
- acceptsKeyPane, currentWindowSize, firstResponder, isKeyPane, isMainPane, isPane, page, rootResponder, touchZ, wantsTouchIntercept, zIndex
- Fields borrowed from SC.View:
- acceptsFirstResponder, acceptsMultitouch, ariaHidden, ariaRole, attributeBindings, autoMixins, backgroundColor, childViewLayout, childViewLayoutOptions, childViews, childViewsNeedLayout, classNameBindings, classNames, concatenatedProperties, createdByParent, designMode, displayProperties, enabledState, firstKeyView, hasLayout, hasTouch, hasVisibility, isBuildingIn, isBuildingOut, isChildViewLayoutLive, isEnabled, isFixedHeight, isFixedPosition, isFixedSize, isFixedWidth, isKeyResponder, isTextSelectable, isView, isVisible, lastKeyView, layerLocationNeedsUpdate, layerNeedsUpdate, layout, modeAdjust, nextKeyView, pane, parentView, previousKeyView, renderDelegateName, shouldInheritCursor, shouldInheritEnabled, tagName, themeName, toolTip, touchBoundary, transitionAdjust, transitionAdjustOptions, transitionHide, transitionHideOptions, transitionIn, transitionInOptions, transitionOut, transitionOutOptions, transitionShow, transitionShowOptions, useStaticLayout
- Fields borrowed from SC.Responder:
- hasFirstResponder, isFirstResponder, responderContext
- Fields borrowed from SC.Object:
- isDestroyed, isObject, nextProperty, object, property, target, toInvalidate
- Fields borrowed from SC.Observable:
- isObservable
Class Methods
Instance Methods
Field Detail
height NumberThe default height of each row. This will be used for a view unless you manually specify a height in the view's layout.
- Default value:
- 20
- Default value:
- 4
The starting top location for the first row. This will increment as views are added to the pane.
- Default value:
- 0
Class Method Detail
Adds a test view to the control pane design. The passed label will be used as the key which you can use to find the view layer. You can either pass a view that is already designed or pass an array of attributes that will be used to create a design on the view.
- Parameters:
- label String
- the view key name
- view SC.View
- a view class or view design
- attrs Hash
- optional attrs to use when designing the view
- Returns:
- SC.ControlTestPane
- receiver
Registers a final test that will instantiate the control test pane and display it. This allows the developer to interact with the controls once the test has completed.