aboutsummaryrefslogtreecommitdiffstats
path: root/test
AgeCommit message (Collapse)Author
2013-09-27fix(log): prevent logging `undefined` for $log in IEColin Casey
Closes #1705
2013-09-27fix(jqLite): use get/setAttribute so that jqLite works on SVG nodesBrian Ford
jqLite previously used `elt.className` to add and remove classes from a DOM Node, but because the className property is not writable on SVG elements, it doesn't work with them. This patch replaces accesses to `className` with `get/setAttribute`. `classList` was also considered as a solution, but because only IE10+ supports it, we have to wait. :'( The JqLiteAddClass/JQLiteRemoveClass methods are now also used directly by $animate to work around the jQuery not being able to handle class modifications on SVG elements. Closes #3858
2013-09-26fix($compile): collect ranges on multiple directives on one elementjankuca
The problem was in keeping the values of `attrNameStart` and `attrNameEnd` between directive loop iterations which lead to the compiler looking for multi-element ranges for any directives that happened to be in the directive list after one that was applied on a range. For instance, having a ng-repeat-start and ng-class on a single element with ng-repeat being resolved first made the compiler look for an ng-repeat-end for both ng-repeat and ng-class because the `attrNameEnd` was not reset to a falsy value before the second iteration. As the result, an exception saying the block end element could not be found and the second directive was not actually applied. Closes #4002
2013-09-26fix(ngAnimate): ensure that delays are always considered before an animation ↵Matias Niemelä
closes Closes #4028
2013-09-25fix(ngRepeat): correctly track elements even when the collection is ↵jankuca
initially undefined Previously if the collection model was set to undefined on the first digest, the repeater would get confused and not use the correct tracking function for associating model with dom elements in the repeater. Closes #4145 Closes #3964
2013-09-20test(ng-non-bindable): test sibling bindingsChirayu Krishnappa
Ref: https://github.com/angular/angular.dart/blob/master/test/directives/ng_non_bindable_spec.dart
2013-09-20fix(ng-bind-html): watch string value instead of wrapperChirayu Krishnappa
Ref: https://github.com/angular/angular.js/pull/4045 I have this sinking feeling that support this use case sort of encourages binding to function that blindly trust some html. For now, I'm fixing the issue while I think about the use cases some more. In the case of a function that performs any non-trivial work before wrapping the value (e.g. the showdown filter in issue #3980, or the binding to a simply wrapper function in issue #3932 if it did anything meaty), this fix makes it "work" - but performance is going to suck - you should bind to some other thing on scope that watches the actual source and adjusts itself when that changes (e.g. the showdown filter.) For the case of the wrapper in #3932, if one isn't performing sanitization or some such thing - then you the developer has insight into why that value is safe in that particular context - and it should be available simply by name and not as a result of a function taking any arbitrary input to make auditing of security a little saner. Closes #3932, #3980
2013-09-20fix(ngInclude): don't break attribute bindings on ngInclude-ed elementBrian Ford
BREAKING CHANGE: ngInclude's priority is now set to 1000 It's quite rare for anyone to depend on explicity directive priority, but if a custom directive that needs to run before ngInclude exists, it should have its priority checked and adjusted if needed. Closes #3793
2013-09-20fix(ngView): IE8 regression due to expando on non-element nodesIgor Minar
This fixes the "TypeError: Object doesn't support this property or method" error on IE8, when view templates contain leading white-space. Closes #3971
2013-09-17fix($parse): disallow access to window and dom in expressionsChirayu Krishnappa
2013-09-17fix(test): fixed toThrow usageChirayu Krishnappa
2013-09-13fix(ngOptions): ignore object properties which start with $Gowtam Lal
2013-09-11test($browser): correct false positive in ApplicationSpec.jsWoody Peterson
Previously, the check that Application should return a new $window and $document had the arguments reversed in the first call to navigateTo; thus, the subsequent check of inequality of $window and $document in the next navigateTo call would always pass. This corrects the argument order, which makes this test not succeptible to false positives.
2013-09-11fix(ngSanitize): sanitizer should not accept <!--> as a valid commentR. Merkert
According to http://validator.w3.org/ , <!--> is not a valid comment and neither is any comment containing the -- substring.
2013-09-06fix(ngAnimate): check elapsedTime on current eventMatias Niemelä
onAnimationProgress now checks the event's elapsedTime property before checking the originalEvent.elapsedTime property. Use browserTrigger with elapsedTime parameter to trigger animation events
2013-09-06fix(ngScenario): provide event parameters as objectMatias Niemelä
BREAKING CHANGE: browserTrigger now uses an eventData object instead of direct parameters for mouse events. To migrate, place the `keys`,`x` and `y` parameters inside of an object and place that as the third parameter for the browserTrigger function.
2013-09-05refactor($animate): use CSS3 transition/animation events instead of ↵Matias Niemelä
$timeouts to track ongoing animations Closes #3629 Closes #3874
2013-09-03fix(ngView): ensure ngClass works with together with ngView's transclusion ↵Matias Niemelä
behavior Closes: #3727
2013-09-03fix(ngAnimate): ensure that ngClass is always compiled before enter, leave ↵Matias Niemelä
and move animations Closes #3727 Closes #3603
2013-09-03chore($rootScope): provide support to execute a function after the digest ↵Matias Niemelä
cycle is complete
2013-09-03fix(ngAnimate): cut down on extra $timeout callsMatias Niemelä
2013-09-03feat(ngMock): allow passing an object literal as shorthand to moduleMerrick Christensen
2013-09-02fix($http): allow empty responses to be cachedjankuca
Closes #3809
2013-08-29fix(core): parse IE11 UA string correctlyChirayu Krishnappa
It's great that IE11 wants to be compatible enough that it doesn't want to be special cased and treated differently. However, as long as one has to have a different code path for IE than for the other supported browsers, we still need to detect and special case it. For instance, our URL parsing code still needs the same workaround the we used for IE10. We still see the same Access denied / TypeError exceptions when setting certain values. FYI, Angular doesn't generally blindly test for IE – we also check the version number. Thanks to modern.ie for the free IE11 test VM. Closes #3682
2013-08-27test(Scope): fix tests after reverting commitsIgor Minar
Making assertions on state (rather than interactions) is better anyway.
2013-08-27revert: feat(mocks): make $timeout#flush throw an exception when emptyIgor Minar
This reverts commit cbf06a5d64aba537f0e2679a194d3998d8365493. This turned out to be a bad idea because it allow us to fast-forward the wall clock time (see previous commit).
2013-08-27revert: fix(mocks): $timeout#flush should not update time when emptyIgor Minar
This reverts commit 42af8eada2803a54a98b4f792e60feb480d68a0c. This turned out to be a bad idea as it prevents us from moving the time forward and asserting that the component state didn't change due to the scheduled task executing too early.
2013-08-26feat(Scope): async auto-flush $evalAsync queue when outside of $digestIgor Minar
This change causes a new $digest to be scheduled in the next tick if a task was was sent to the $evalAsync queue from outside of a $digest or an $apply. While this mode of operation is not common for most of the user code, this change means that $q promises that utilze $evalAsync queue to guarantee asynchronicity of promise apis will now also resolve outside of a $digest, which turned out to be a big pain point for some developers. The implementation ensures that we don't do more work than needed and that we coalese as much work as possible into a single $digest. The use of $browser instead of setTimeout ensures that we can mock out and control the scheduling of "auto-flush", which should in theory allow all of the existing code and tests to work without negative side-effects. Closes #3539 Closes #2438
2013-08-25fix(mocks): $timeout#flush should not update time when emptyIgor Minar
When $timeout#flush is called with a delay and no task can be flushed within that delay, the current time should not be updated as that gets the mock into an inconsistent state. BREAKING CHANGE: if a tests was written around the buggy behavior the delays might be off now This would typically not be a problem, but because of the previous breaking change in $timeout.flush, the combination of two might be confusing and that's why we are documenting it. Old behavior: ``` doSomething(); //schedules task to execute in 500ms from now doOtherStuff(); //schedules task to execute in 600ms from now try { $timeout.flush(300); // throws "no task to be flushed" exception } catch(e) {}; $time.flush(200); //flushes only doSomething() task ``` New behavior: ``` doSomething(); //schedules task to execute in 500ms from now doOtherStuff(); //schedules task to execute in 600ms from now try { $timeout.flush(300); // throws "no task to be flushed" exception } catch(e) {}; $time.flush(200); // throws "no task to be flushed" exception again // because previous exception didn't move the time forward ``` Fixed test: ``` doSomething(); //schedules task to execute in 500ms from now doOtherStuff(); //schedules task to execute in 600ms from now try { $timeout.flush(300); // throws "no task to be flushed" exception } catch(e) {}; $time.flush(500); // flushes only doSomething() task ```
2013-08-25feat(mocks): make $timeout#flush throw an exception when emptyIgor Minar
When calling $timeout.flush with or without a delay an exception should be thrown if there is nothing to be flushed. This prevents tests from flushing stuff unnecessarily. BREAKING CHANGE: calling $timeout.flush(delay) when there is no task to be flushed within the delay throws an exception now. Please adjust the delay or remove the flush call from your tests as the exception is a signed of a programming error.
2013-08-25test(docs): disable brittle tests that need to be rewrittenIgor Minar
2013-08-25style(animateSpec): remove wsIgor Minar
2013-08-24fix($q): reject should catch & forward exceptions thrown in errbackIgor Minar
2013-08-23chore: reorganize test helper files under test/helpersIgor Minar
2013-08-23fix($animate): skip ngAnimate animations if the provided element already has ↵Matias Niemelä
transitions/durations attached to it Closes #3587
2013-08-23fix($animate): only execute a timeout when transitions or keyframe ↵Matias Niemelä
animations are used ngAnimate causes a 1ms flicker on the screen when no CSS animations are present on the element. The solution is to change $animate to only use $timeouts when a duration is found on the element before the transition/keyframe animation takes over. Closes #3613
2013-08-23feat(ngMock): add support for creating dynamic style sheets within test codeMatias Niemelä
2013-08-23test: rename / remove duplicate unit testsVojta Jina
2013-08-23fix($sniffer): history problems on Boxee boxDusan Bartos
History API not working properly on Boxee box browser (old Webkit) problem similar to the one on Android < 4
2013-08-22revert: fix($sce): allow IE7 standards mode to pass non-quirks mode testChirayu Krishnappa
This reverts commit 637c9b1611c5a75a42048ee1c591521c7031751a. (ref #3633 and #3646) The minimum bar for $sce is IE8 in standards mode. IE7 standards mode is not supported. If you must support IE7, you should disable $sce completely. angular.module('ie7support', []).config(function($sceProvider) { // Completely disable SCE to support IE7. $sceProvider.enabled(false); });
2013-08-21fix($q): fix forwarding resolution when callbacks aren't functionsBrian Ford
Uses the changes from @jamestalmage's fix in #3535. (thanks!) Closes #3535
2013-08-21fix($sce): allow IE7 standards mode to pass non-quirks mode testjustinrknowles
Changes documentMode test version to 7 in order to support IE 8 in IE 7 standards mode while still protecting against quirks mode. documentMode returns the following values: 5 - quirks mode, 7 - IE 7 standards mode, 8 - IE 8 standards mode. Closes #3633 Closes #3646
2013-08-20fix(ngTransclude): clear the translusion point before transcludingIgor Minar
when the transluded content is being teleported to the translusion point, we should ensure that the translusion point is empty before appending otherwise we end up with junk before the transcluded content
2013-08-20fix(ngTransclude): make the transclusion available to parent post-linkIgor Minar
previously the translusion was appended the the ngTranslude element via $evalAsync which makes the transluded dom unavailable to parent post-linking functions. By appending translusion in linking phase, post-linking functions will be able to access it.
2013-08-19fix($sniffer): ensure older versions of webkit work for animationsMatias Niemelä
2013-08-19revert(ngInclude): remove ngInclude manual transclusion systemMatias Niemelä
2013-08-15fix(filter): filter on false propertiesTom Dunstan
Code was evaluating !expression[key] while attempting to see if the key was present, but this was evaluating to true for false values as well as missing keys. Closes #2797.
2013-08-15fix($parse): handle promises returned from parsed function callsJussi Kosunen
When a parsed function call returns a promise, the evaluated value is the resolved value of the promise rather than the promise object. Closes #3503
2013-08-15feat(minerr): log minerr doc url in developmentKen Sheedlo
Closes #3566
2013-08-14fix($timeout): clean deferreds immediately after callback exec/cancelAndy Gurden
Make sure $timeout callbacks are forgotten about immediately after execution or cancellation. Previously when passing invokeApply=false, the cleanup used $q and so would be pending until the next $digest was triggered. This does not make a large functional difference, but can be very visible when looking at memory consumption of an app or debugging around the $$asyncQueue - these callbacks can have a big retaining tree.