diff --git a/config/karma.js b/config/karma.js index 02e0a9ddf..cfe7fbfc5 100644 --- a/config/karma.js +++ b/config/karma.js @@ -8,7 +8,7 @@ module.exports = function (karma) { basePath: '..', // list of files / patterns to load in the browser - files: [].concat(files.angular('1.2.4'), files.testUtils, files.src, files.test), + files: [].concat(files.angular('1.2.14'), files.testUtils, files.src, files.test), // level of logging // possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG diff --git a/files.js b/files.js index 719f5a61f..d7d1dffcb 100644 --- a/files.js +++ b/files.js @@ -25,10 +25,10 @@ routerFiles = { return [ 'lib/angular-' + version + '/angular.js', 'lib/angular-' + version + '/angular-mocks.js' - ].concat(version === '1.2.4' ? ['lib/angular-' + version + '/angular-animate.js'] : []); + ].concat(version === '1.2.14' ? ['lib/angular-' + version + '/angular-animate.js'] : []); } }; if (exports) { exports.files = routerFiles; -} \ No newline at end of file +} diff --git a/lib/angular-1.2.4/angular-animate.js b/lib/angular-1.2.14/angular-animate.js similarity index 66% rename from lib/angular-1.2.4/angular-animate.js rename to lib/angular-1.2.14/angular-animate.js index 5bb497af4..1c494063f 100755 --- a/lib/angular-1.2.4/angular-animate.js +++ b/lib/angular-1.2.14/angular-animate.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.2.4 + * @license AngularJS v1.2.14 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ @@ -8,7 +8,7 @@ /* jshint maxlen: false */ /** - * @ngdoc overview + * @ngdoc module * @name ngAnimate * @description * @@ -16,7 +16,6 @@ * * The `ngAnimate` module provides support for JavaScript, CSS3 transition and CSS3 keyframe animation hooks within existing core and custom directives. * - * {@installModule animate} * *
* @@ -38,12 +37,14 @@ * | {@link ng.directive:ngIf#usage_animations ngIf} | enter and leave | * | {@link ng.directive:ngClass#usage_animations ngClass} | add and remove | * | {@link ng.directive:ngShow#usage_animations ngShow & ngHide} | add and remove (the ng-hide class value) | + * | {@link ng.directive:form#usage_animations form} | add and remove (dirty, pristine, valid, invalid & all other validations) | + * | {@link ng.directive:ngModel#usage_animations ngModel} | add and remove (dirty, pristine, valid, invalid & all other validations) | * * You can find out more information about animations upon visiting each directive page. * * Below is an example of how to apply animations to a directive that supports animation hooks: * - *
+ * ```html
  * 
+       
userType: Required!
userType = {{userType}}
@@ -25147,20 +25499,32 @@ function FormController(element, attrs) { myForm.$valid = {{myForm.$valid}}
myForm.$error.required = {{!!myForm.$error.required}}
- - + + it('should initialize to model', function() { - expect(binding('userType')).toEqual('guest'); - expect(binding('myForm.input.$valid')).toEqual('true'); + var userType = element(by.binding('userType')); + var valid = element(by.binding('myForm.input.$valid')); + + expect(userType.getText()).toContain('guest'); + expect(valid.getText()).toContain('true'); }); it('should be invalid if empty', function() { - input('userType').enter(''); - expect(binding('userType')).toEqual(''); - expect(binding('myForm.input.$valid')).toEqual('false'); + var userType = element(by.binding('userType')); + var valid = element(by.binding('myForm.input.$valid')); + var userInput = element(by.model('userType')); + + userInput.clear(); + userInput.sendKeys(''); + + expect(userType.getText()).toEqual('userType ='); + expect(valid.getText()).toContain('false'); }); - - + + + * + * @param {string=} name Name of the form. If specified, the form controller will be published into + * related scope, under this name. */ var formDirectiveFactory = function(isNgForm) { return ['$timeout', function($timeout) { @@ -25231,14 +25595,14 @@ var ngFormDirective = formDirectiveFactory(true); */ var URL_REGEXP = /^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/; -var EMAIL_REGEXP = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}$/; +var EMAIL_REGEXP = /^[a-z0-9!#$%&'*+/=?^_`{|}~.-]+@[a-z0-9-]+(\.[a-z0-9-]+)*$/i; var NUMBER_REGEXP = /^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/; var inputType = { /** - * @ngdoc inputType - * @name ng.directive:input.text + * @ngdoc input + * @name input[text] * * @description * Standard HTML text input with angular data binding. @@ -25261,8 +25625,8 @@ var inputType = { * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input. * * @example - - + +
Red
- Green
+ Green
Blue
- color = {{color}}
+ color = {{color | json}}
-
- + Note that `ng-value="specialValue"` sets radio item's value to be the value of `$scope.specialValue`. + + it('should change state', function() { - expect(binding('color')).toEqual('blue'); + var color = element(by.binding('color')); + + expect(color.getText()).toContain('blue'); - input('color').select('red'); - expect(binding('color')).toEqual('red'); + element.all(by.model('color')).get(0).click(); + + expect(color.getText()).toContain('red'); }); - -
+ + */ 'radio': radioInputType, /** - * @ngdoc inputType - * @name ng.directive:input.checkbox + * @ngdoc input + * @name input[checkbox] * * @description * HTML checkbox. @@ -25575,8 +25972,8 @@ var inputType = { * interaction with the input element. * * @example - - + + + + Update input to see transitions when valid/invalid. + Integer is a valid value. +
+ +
+
+ *
*/ var ngModelDirective = function() { return { @@ -26445,10 +26920,13 @@ var ngModelDirective = function() { /** * @ngdoc directive - * @name ng.directive:ngChange + * @name ngChange * * @description - * Evaluate given expression when user changes the input. + * Evaluate the given expression when the user changes the input. + * The expression is evaluated immediately, unlike the JavaScript onchange event + * which only triggers at the end of a change (usually, when the user leaves the + * form element or presses the return key). * The expression is not evaluated when the value change is coming from the model. * * Note, this directive requires `ngModel` to be present. @@ -26458,8 +26936,8 @@ var ngModelDirective = function() { * in input value. * * @example - * - * + * + * * Load inlined template
-
- + + it('should load template defined inside script tag', function() { - element('#tpl-link').click(); - expect(element('#tpl-content').text()).toMatch(/Content of the template/); + element(by.css('#tpl-link')).click(); + expect(element(by.css('#tpl-content')).getText()).toMatch(/Content of the template/); }); - -
+ + */ var scriptDirective = ['$templateCache', function($templateCache) { return { @@ -29457,7 +30198,7 @@ var scriptDirective = ['$templateCache', function($templateCache) { var ngOptionsMinErr = minErr('ngOptions'); /** * @ngdoc directive - * @name ng.directive:select + * @name select * @restrict E * * @description @@ -29473,14 +30214,21 @@ var ngOptionsMinErr = minErr('ngOptions'); * represented by the selected option will be bound to the model identified by the `ngModel` * directive. * + *
+ * **Note:** `ngModel` compares by reference, not value. This is important when binding to an + * array of objects. See an example [in this jsfiddle](http://jsfiddle.net/qWzTb/). + *
+ * * Optionally, a single hard-coded `