aboutsummaryrefslogtreecommitdiffstats
path: root/test
AgeCommit message (Collapse)Author
2014-02-18fix(jqLite): make jqLite('<iframe src="someurl">').contents() return iframe ↵Caitlin Potter
document, as in jQuery This is a very tiny change to make behaviour consistent with jQuery. Closes #6320 Closes #6323
2014-02-18style: remove ws and enfore no-trailing-ws jscs ruleIgor Minar
2014-02-18test(docs): add check for resilience to trailing slashes, etc.Peter Bacon Darwin
2014-02-16test(docs-app-e2e): refactor test inline with new docs appPeter Bacon Darwin
The links to code elements have now changed: api/ng.directive:ngClick -> api/ng/directive/ngClick. Examples now run inside iframes, so we need to instruct Protractor to switch to the example iframe.
2014-02-15fix(numberFilter): convert all non-finite/non-numbers/non-numeric strings to ↵Sergei Z
the empty string The previous code for filtering out non-finite numbers was broken, as it would convert `null` to `0`, as well as arrays. This change fixes this by converting null/undefined/NaN/Infinity/any object to the empty string. Closes #6188 Closes #6261
2014-02-14style(animate): remove wsIgor Minar
2014-02-14fix($animate): ensure $animate doesn't break natural CSS transitionsMatias Niemelä
BREAKING CHANGE: ngClass and {{ class }} will now call the `setClass` animation callback instead of addClass / removeClass when both a addClass/removeClass operation is being executed on the element during the animation. Please include the setClass animation callback as well as addClass and removeClass within your JS animations to work with ngClass and {{ class }} directives. Closes #6019
2014-02-14pref($animate): only trigger DOM callbacks if registered on the element ↵Matias Niemelä
being animated BREAKING CHANGE: Both the `$animate:before` and `$animate:after` DOM events must be now registered prior to the $animate operation taking place. The `$animate:close` event can be registered anytime afterwards. DOM callbacks used to fired for each and every animation operation that occurs within the $animate service provided in the ngAnimate module. This may end up slowing down an application if 100s of elements are being inserted into the page. Therefore after this change callbacks are only fired if registered on the element being animated.
2014-02-14pref($animate): group all asynchronous requests into one shared bufferMatias Niemelä
2014-02-14chore(jqLite): expose the _data lookup function to angular.elementMatias Niemelä
2014-02-14fix($compile) support templates with table content root nodesCaitlin Potter
If the first element in a template is a <tr>, <th>, <td>, or <tbody> tag, the HTML compiler will ensure that the template is wrapped in a <table> element so that the table content is not discarded. Closes #2848 Closes #1459 Closes #3647 Closes #3241
2014-02-12fix(input): setViewValue on compositionendCaitlin Potter
Because of a4e6d962, model is not updated on input/change between the compositionstart and compositionend events. Unfortunately, the compositionend event does not always happen prior to an input/change event. This changeset calls the listener function to update the model after a compositionend event is received. Closes #6058 Closes #5433
2014-02-11feat(filterFilter): support deeply nested predicate objectsCaitlin Potter
Due to 339a165, it became impossible to filter nested properties of an object using the filterFilter. A proposed solution to this was to enable the use of nested predicate objects. This change enables the use of these nested predicate objects. Example: ```html <div ng-repeat="it in items | filter:{ address: { country: 'Canuckistan'}}"></div> ``` Or ```js $filter('filter')(items, { address: { country: 'Canuckistan' } }); ``` Closes #6215 Related to #6009
2014-02-10fix($compile): ensure element transclusion directives are linked with ↵Caitlin Potter
comment element This corrects a complicated compiler issue, described in detail below: Previously, if an element transclusion directive contained an asynchronous directive whose template contained another element transclusion directive, the inner element transclusion directive would be linked with the element, rather than the expected comment node. An example manifestation of this bug would look like so: ```html <div ng-repeat="i in [1,2,3,4,5]"> <div my-directive> </div> </div> ``` `my-directive` would be a replace directive, and its template would contain another element transclusion directive, like so: ```html <div ng-if="true">{{i}}</div> ``` ngIf would be linked with this template content, rather than the comment node, and the template element would be attached to the DOM, rather than the comment. As a result, this caused ng-if to duplicate the template when its expression evaluated to true. Closes #6006 Closes #6101
2014-02-06fix(mocks): rename mock.animate to ngAnimateMock and ensure it contains all ↵Matias Niemelä
test helper code for ngAnimate Closes #5822 Closes #5917
2014-02-06fix(mocks): remove usage of $animate.flushNext in favour of queingMatias Niemelä
The flushNext method of testing is difficult and highly coupled with the behavior of ngAnimate's $animate workflow. It is much better instead to just queue all $animate animation calls into a queue collection which is available on the $animate service when mock.animate is included as a module within test code.
2014-02-05chore(testing): run end to end tests on firefox and safari as well as chromeJulie
Update the Travis and Jenkins configs to run protractor tests on Safari and Firefox as well, and make the Travis tests run output XML and turn off color. Fix tests which were failing in Firefox due to clear() not working as expected. Fix tests which were failing in Safari due to SafariDriver not understanding the minus key, and disable tests which SafariDriver has no support for.
2014-02-04fix(ngMock): return false from mock $interval.cancel() when no argument is ↵Daniel Luxemburg
supplied Closes #6103. Closed #6099.
2014-02-04fix(jqLite): trim HTML string in jqLite constructorCaitlin Potter
jQuery will construct DOM nodes containing leading whitespace. Prior to this change, jqLite would throw a nosel minErr due to the first character of the string not being '<'. This change corrects this behaviour by trimming the element string in jqLite constructor before testing for '<'. Closes #6053
2014-02-04fix(ngResource): don't filter "$"-prefixed properties from ngResource ↵Thomas Belin
requests/responses ngResource no longer filters properties prefixed with a single "$" character from requests or responses, correcting a regression introduced in 1.2.6 (cb29632a) which caused shallowCopy and shallowClearAndCopy to ignore properties prefixed with a single "$". Closes #5666 Closes #6080 Closes #6033
2014-02-03fix(mocks): always call functions injected with `inject` with `this` set to ↵Wes Alvaro
the current spec Currently when a function is injected inside of a test we set the context to undefined which is a bug. Closes #6102
2014-02-03fix(ngResource): don't append number to '$' in url param value when encoding URICaitlin Potter
Previously, if a URL parameter value included a $, it would replace the dollar sign with a literal '$1' for mysterious reasons. Using a function rather than a replacement string circumvents this behaviour and produces a more expected result. Closes #6003 Closes #6004
2014-01-31fix($q): make $q.reject support `finally` and `catch`Lucas Galfasó
Add support for the functions `finally` and `catch` to the promise returned by `$q.reject` Closes #6048 Closes #6076
2014-01-31fix($compile): retain CSS classes added in cloneAttachFn on asynchronous ↵Caitlin Potter
directives Previously, classes added to asynchronous directive elements during the clone attach function would not persist after the node is merged with the template, prior to linking. This change corrects this behaviour and brings it in line with synchronous directives. Closes #5439 Closes #5617
2014-01-31fix(filterFilter): don't interpret dots in predicate object fields as pathsIgor Minar
Closes #6005 Closes #6009
2014-01-24feat($animate): provide support for a close callbackMatias Niemelä
Closes #5685 Closes #5053 Closes #4993
2014-01-22fix(a): don't preventDefault on click when SVGAElement has an xlink:href ↵Caitlin Potter
attribute Before this change, an SVGAElement with an xlink:href attribute and no href or name attribute which was compiled by the angular HTML compiler would never be clickable, due to the htmlAnchorDirective calling event.preventDefault() due to the missing href attribute. This change corrects this behaviour by also testing the xlink:href attribute if the element in question is determined to be an SVG anchor tag (with the href property having type SVGAnimatedString) Closes #5896 Closes #5897
2014-01-21fix(input): use Chromium's email validation regexpCaitlin Potter
This change uses the regexp from Chromium/Blink to validate emails, and corrects an error in the validation engine, which previously considered an invalid email to be valid. Additionally, the regexp was invalidating emails with capital letters, however this is not the behaviour recomended in the spec, or implemented in Chromium. Closes #5899 Closes #5924
2014-01-21fix($parse): do not use locals to resolve object propertiesLucas Galfasó
Do not use the locals when performing a field access in an angular expression. Closes #5838 Closes #5862
2014-01-14feat($animate): provide support for DOM callbacksMatias Niemelä
2014-01-14feat($animate): use requestAnimationFrame instead of a timeout to issue a reflowMatias Niemelä
Closes #4278 Closes #4225
2014-01-14fix($animate): ensure the final closing timeout respects staggering animationsMatias Niemelä
2014-01-14chore($animate): remove useless and expired testMatias Niemelä
2014-01-14fix($animate): prevent race conditions for class-based animations when ↵Matias Niemelä
animating on the same CSS class Closes #5588
2014-01-14fix($animate): correctly detect and handle CSS transition changes during ↵Matias Niemelä
class addition and removal When a CSS class containing transition code is added to an element then an animation should kick off. ngAnimate doesn't do this. It only respects transition styles that are already present on the element or on the setup class (but not the addClass animation).
2014-01-14fix($animate): avoid accidentally matching substrings when resolving the ↵Matias Niemelä
presence of className tokens
2014-01-13fix($http): ensure default headers PUT and POST are different objectsHendrixer
Send PUT and POST through copy() to make sure they are not the same. Closes #5742 Closes #5747 Closes #5764
2014-01-13revert: fix($route): update current route upon $route instantiationIgor Minar
This reverts commit 2b344dbd20777fb1283b3a5bcf35a6ae8d09469d. I think I merged this commit prematurely and in addition to that we found out that it's breaking google apps. Jen Bourey will provide more info at the original PR #5681
2014-01-13fix($rootScope): prevent infinite $digest by checking if asyncQueue is empty ↵Noam Lewis
when decrementing ttl An infinite $digest loop can be caused by expressions that invoke a promise. The problem is that $digest does not decrement ttl unless it finds dirty changes; it should check also if asyncQueue is empty. Generally the condition for decrementing ttl should be the same as the condition for terminating the $digest loop. Fixes #2622
2014-01-10fix($route): update current route upon $route instantiationDaniel Zimmermann
This fixes cases where the first ngView is loaded in a template asynchronously (such as through ngInclude), as the service will miss the first event otherwise. Closes #4957
2014-01-10feat(select): allow multiline ng-optionsAjay Roopakalu
This patch allows the ng-options value of a <select> element to span multiple lines, which would previously throw an error when used with filters. Closes #5602
2014-01-10fix($http): return responseText on IE8 for requests with responseType setIgor Minar
Closes #4464 Closes #4738 Closes #5636
2014-01-09revert: fix($location): return '/' for root path in hashbang modeIgor Minar
This reverts commit 63cd873fef3207deef30c7a7ed66f4b8f647dc12. The change breaks existing tests of Google apps. The problem is that while we tried to avoid adding #/ to window.location.href unnecessarily we failed doing so. Likely because by setting $path, at some point (during a digest) we try to check if $location changed and we mistake the default '/' with an explicit settign of the path via the `path()` method. This results in us writing the url with '#/' into $browser.url() which updates the window.location by adding "#/" to the url - something we tried to avoid in the first place. I'll reopen PR #5712.
2014-01-09test(docs): add protractor tests for docs appJeff Cross
Closes #5437
2014-01-09fix($location): return '/' for root path in hashbang modeCaitlin Potter
Before this change, on the root of the application, $location.path() would return the empty string. Following this change, it will always return a root of '/'. Closes #5650 Closes #5712
2014-01-09fix($httpBackend): Allow status code 0 from any protocolRafał Jagoda
Android 4.1 stock browser also returns status code 0 when a template is loaded via `http` and the application is cached using appcache. Fixes #1356. Closes #5547.
2014-01-08fix($httpBackend): cancelled JSONP requests will not print error in the consoleArtemy Tregubenko
When you cancel a JSONP request, angular deletes the callback for it. However the script still executes, and since the callback is now deleted and undefined, the script throws an exception visible in the console. The quick fix for this is not to delete the callback, but replace it with `angular.noop`. Closes #5615 Closes #5616
2014-01-06test(ngMock): fix the tests to not use global msieVojta Jina
My bad when merging 7e916455b36dc9ca4d4afc1e44cade90006d00e3. These tests are run with compiled Angular and then the msie is not defined.
2014-01-06fix(ngMock window.inject): Remove Error 'stack' property changesAndrew C. Greenberg
Recent browsers, particularly PhantomJS 1.9.2 and Safari 7.0 treat the stack property as non-configurable and unwritable. Because window.inject captures the stack at the time of the inject, and attempts to insert it into a captured throw from the injected function by modifying e.stack, a meaningless error message and stack is thrown instead. This commit inserts two tests exposing the problem, and implements a proposed solution that builds a new error-like object that mimicks the old Error object, but with the additional stack information, and captures the toString function from the Error object prototype. This appears to work for the browsers suppoerted here.
2014-01-06chore(inputSpec): fixed typoBen Wiklund