Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit bf285d3

Browse files
committed
jQuery compatible element() selector
Changing $document.find to angular.element permits more complex selectors when using jQuery. Otherwise you're limited to selecting only by ID's and element tags which is very restricting in the real life testing scenarios.
1 parent 2508b47 commit bf285d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ngScenario/SpecRunner.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ angular.scenario.SpecRunner.prototype.addFutureAction = function(name, behavior,
117117
angular.forEach(args, function(value, index) {
118118
selector = selector.replace('$' + (index + 1), value);
119119
});
120-
var result = $document.find(selector);
120+
var result = angular.element(selector);
121121
if (selector.match(NG)) {
122122
angular.forEach(['[ng-','[data-ng-','[x-ng-'], function(value, index){
123123
result = result.add(selector.replace(NG, value), $document);

0 commit comments

Comments
 (0)