aboutsummaryrefslogtreecommitdiffstats
path: root/test
AgeCommit message (Collapse)Author
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
2014-01-06refactor(animate): remove duplicate lineChris Chua
2014-01-05refactor(filterFilter): simplify code by a ternary op instead of if-elseRoyLING
- use only one IIFE and a ternary op in it, instead of invoking separate IIFEs in if-else (this also completely fixed the same issue closed by PR #3597) - also add a spec to verify usage of '$' property in expression object (e.g. `{$: 'a'}`) Closes #5637
2014-01-03fix($parse): fix CSP nested property evaluation, and issue that prevented ↵Brian Nenninger
its tests from failing cspSafeGetterFn incorrectly returned undefined if any of its key parameters were undefined. This wasn't caught by the $parse unit tests because of a timing problem where $ParseProvider was reading the CSP flag before the tests manually set it, so the CSP property evaluation tests never ran. Add test that verifies evaluation of nested properties of multiple lengths. Closes #5591 Closes #5592
2014-01-03fix($httpBackend): don't delete xhr.onreadystatechange otherwise Safari :-OIgor Minar
2014-01-03fix($animate): ensure class-based animations are always skipped before ↵Matias Niemelä
structural post-digest tasks are run Closes #5582
2014-01-02fix($resource): prevent URL template from collapsing into an empty stringGias Kay Lee
if url template would result in an empty string, we should make a request to '/' instead. Closes #5455 Closes #5493
2014-01-02fix(ngShow/ngHide, ngIf): functions with zero args should be truthyBrian Ford
Previously, expressions that were a function with one or more arguments evaluated to true, but functions with zero arguments evaluated to false. This behavior seems both unintentional and undesirable. This patch makes a function truthy regardless of its number of arguments. Closes #5414
2014-01-02fix($httpBackend): use ActiveX XHR when making PATCH requests on IE8Igor Minar
IE8's native XHR doesn't support PATCH requests, but the ActiveX one does. I'm also removing the noxhr error doc because nobody will ever get that error. Closes #2518 Closes #5043
2014-01-02fix($location): $location.path() behaviour when $locationChangeStart is ↵Sebastian K
triggered by the browser Fixed inconsistency in $location.path() behaviour on the $locationChangeStart event when using back/forward buttons in the browser or manually changing the url in the address bar. $location.path() now returns the target url in these cases. Closes #4989 Closes #5089 Closes #5118 Closes #5580
2014-01-02fix($browser): remove base href domain when url begins with '//'Caitlin Potter
This change prevents an incorrect appBase url from being calculated when the <base> href's domain begins with '//'. Closes #5606
2014-01-02fix(ngRepeat): allow for more flexible coding style in ngRepeat expressionGias Kay Lee
With this change it's possible to split the ng-repeat expression into multiple lines at any point in the expression where white-space is expected. Closes #5537 Closes #5598
2014-01-02fix(Scope): don't let watch deregistration mess up the dirty-checking digest ↵Igor Minar
loop Closes #5525
2014-01-02test(rootScope): reorganize $watch deregistration specs into a describeIgor Minar
2014-01-02fix($httpBackend): Ignore multiple calls to onreadystatechange with readyState=4Tobias Bosch
On mobile webkit `onreadystatechange` might by called multiple times with `readyState===4` caused by xhrs that are resolved while the app is in the background. Fixes #5426.
2014-01-02fix(animate): remove trailing `s`Olivier Louvignes