aboutsummaryrefslogtreecommitdiffstats
path: root/test/helpers
diff options
context:
space:
mode:
authorjankuca2013-09-23 11:24:42 -0700
committerVojta Jina2013-10-09 15:19:10 -0700
commit9efa46ae640cde17487c341daa9a75c0bd79da02 (patch)
treeaddebed6c08a10e5f27a99140d3f5846992d43a2 /test/helpers
parent64fd2c421ed582c16812d164a8a6f031b8e66287 (diff)
downloadangular.js-9efa46ae640cde17487c341daa9a75c0bd79da02.tar.bz2
feat(ngRepeat): use block separator comments
Issue: multi-elements ng-repeat (ng-repeat-start, ng-repeat-end) can contain elements with a trancluding directive. This directive changes content of the row (template) and ng-repeat does not work correctly (when removing/moving rows), because ng-repeat works with the original template (elements). This changes ng-repeat behavior to traverse the DOM to find current elements everytime we are moving/removing rows (if the template has multiple elements). Closes #3104
Diffstat (limited to 'test/helpers')
-rw-r--r--test/helpers/testabilityPatch.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/helpers/testabilityPatch.js b/test/helpers/testabilityPatch.js
index 514a5fdb..41b5042a 100644
--- a/test/helpers/testabilityPatch.js
+++ b/test/helpers/testabilityPatch.js
@@ -226,6 +226,17 @@ function sortedHtml(element, showNgClass) {
}
+function childrenTagsOf(element) {
+ var tags = [];
+
+ forEach(jqLite(element).children(), function(child) {
+ tags.push(child.nodeName.toLowerCase());
+ });
+
+ return tags;
+}
+
+
// TODO(vojta): migrate these helpers into jasmine matchers
/**a
* This method is a cheap way of testing if css for a given node is not set to 'none'. It doesn't