TextField#pattern

patternStringpublic Defined in packages/ember-htmlbars/lib/components/text_field.js:134 The pattern attribute of input element. Default: null

TextField#max

maxStringpublic Defined in packages/ember-htmlbars/lib/components/text_field.js:155 Available since 1.4.0 The max attribute of input element used with type="number" or type="range". Default: null

Testing Routes

Testing Routes Unit testing methods and computed properties follows previous patterns shown in Unit Testing Basics because Ember.Route extends Ember.Object. Testing routes can be done both via acceptance or unit tests. Acceptance tests will likely provide better coverage for routes because routes are typically used to perform transitions and load data, both of which are tested more easily in full context rather than isolation. That being said, sometimes it is important to unit test your route

TextField

Ember.TextField Class PUBLIC Extends: Ember.Component Uses: Ember.TextSupport Defined in: packages/ember-htmlbars/lib/components/text_field.js:37 Module: ember-views The internal class used to create text inputs when the {{input}} helper is used with type of text. See Ember.Templates.helpers.input for usage details. Layout and LayoutName properties Because HTML input elements are self closing layout and layoutName properties will not be applied. See Ember.View's layout section for more inf

TextArea

Ember.TextArea Class PUBLIC Extends: Ember.Component Uses: Ember.TextSupport Defined in: packages/ember-htmlbars/lib/components/text_area.js:8 Module: ember-views The internal class used to create textarea element when the {{textarea}} helper is used. See Ember.Templates.helpers.textarea for usage details. Layout and LayoutName properties Because HTML textarea elements do not contain inner HTML the layout and layoutName properties will not be applied. See Ember.View's layout section for mo

Testing Controllers

Testing Controllers Unit testing methods and computed properties follows previous patterns shown in Unit Testing Basics because Ember.Controller extends Ember.Object. Unit testing controllers is very simple using the unit test helper which is part of the ember-qunit framework. Testing Controller Actions Here we have a controller PostsController with two properties, a method that sets one of those properties, and an action named setProps. You can follow along by generating your own controller

Test.QUnitAdapter

Ember.Test.QUnitAdapter Class PUBLIC Extends: Ember.Test.Adapter Defined in: packages/ember-testing/lib/adapters/qunit.js:4 Module: ember This class implements the methods defined by Ember.Test.Adapter for the QUnit testing framework.

Testing Components

Testing Components Components can be tested with integration tests using the moduleForComponent helper. Let's assume we have a component with a style property that is updated whenever the value of the name property changes. The style attribute of the component is bound to its style property. You can follow along by generating your own component with ember generate component pretty-color. app/components/pretty-color.js import Ember from 'ember'; export default Ember.Component.extend({ att

Testing

Introduction Testing is a core part of the Ember framework and its development cycle. Let's assume you are writing an Ember application which will serve as a blog. This application would likely include models such as user and post. It would also include interactions such as login and create post. Let's finally assume that you would like to have automated tests in place for your application. There are three different classifications of tests that you will need: Acceptance, Unit, and Integratio

Testing Models

Testing Models Unit testing methods and computed properties follows previous patterns shown in Unit Testing Basics because DS.Model extends Ember.Object. Ember Data Models can be tested using the moduleForModel helper. Let's assume we have a Player model that has level and levelName attributes. We want to call levelUp() to increment the level and assign a new levelName when the player reaches level 5. You can follow along by generating your own model with ember generate model player. app/mo