aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Macejak2012-10-29 21:54:26 -0400
committerIgor Minar2012-10-31 14:10:26 -0700
commitad7ce0d40216cf3e0a721ef3a4815a03ae9f0bd9 (patch)
tree40bf1da45a83a4e6a700f9a86584387f5343903e /src
parent085e0ea8ef628bfb71a17e8f3030efb25cd6b90f (diff)
downloadangular.js-ad7ce0d40216cf3e0a721ef3a4815a03ae9f0bd9.tar.bz2
fix(scenario-runner): support data-ng and x-ng based attributes
Prefixed attributes like data-ng-model and x-ng-model were not being found by the Selector. It was only looking at ng: and ng- prefixed attributes. Added a few tests as well to ensure the aforementioned prefixed attributes are being matched properly. Closes #1020
Diffstat (limited to 'src')
-rw-r--r--src/ngScenario/SpecRunner.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ngScenario/SpecRunner.js b/src/ngScenario/SpecRunner.js
index f4b9b0a7..23cc1dc7 100644
--- a/src/ngScenario/SpecRunner.js
+++ b/src/ngScenario/SpecRunner.js
@@ -119,7 +119,9 @@ angular.scenario.SpecRunner.prototype.addFutureAction = function(name, behavior,
});
var result = $document.find(selector);
if (selector.match(NG)) {
- result = result.add(selector.replace(NG, '[ng-'), $document);
+ angular.forEach(['[ng-','[data-ng-','[x-ng-'], function(value, index){
+ result = result.add(selector.replace(NG, value), $document);
+ });
}
if (!result.length) {
throw {