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

Commit

Permalink
jQuery compatible element() selector
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
stsvilik committed Feb 21, 2013
1 parent 2508b47 commit bf285d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ngScenario/SpecRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ angular.scenario.SpecRunner.prototype.addFutureAction = function(name, behavior,
angular.forEach(args, function(value, index) {
selector = selector.replace('$' + (index + 1), value);
});
var result = $document.find(selector);
var result = angular.element(selector);
if (selector.match(NG)) {
angular.forEach(['[ng-','[data-ng-','[x-ng-'], function(value, index){
result = result.add(selector.replace(NG, value), $document);
Expand Down

0 comments on commit bf285d3

Please sign in to comment.