aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorIgor Minar2011-09-16 00:05:13 +0200
committerIgor Minar2011-09-16 02:44:34 +0200
commit6883e8c7a0c121319ced63596718d34e3ab650a8 (patch)
tree49bcfe944b6e72bddf86379bf1b7a13b571504b0 /test
parent7ae536d0532b7ad7859f9cf7e47b406f63383f29 (diff)
downloadangular.js-6883e8c7a0c121319ced63596718d34e3ab650a8.tar.bz2
feat(scenarioRunner): adding support for element().prop()
since jQuery 1.6.4 attr() focuses only on work with element attributes and doesn't deal well with element properties, so adding prop() support is required for getting many e2e tests to pass after upgrading the runner to jQuery 1.6.4.
Diffstat (limited to 'test')
-rw-r--r--test/scenario/dslSpec.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/scenario/dslSpec.js b/test/scenario/dslSpec.js
index 0334dd78..3160da8d 100644
--- a/test/scenario/dslSpec.js
+++ b/test/scenario/dslSpec.js
@@ -287,6 +287,18 @@ describe("angular.scenario.dsl", function() {
expect(doc.find('div').attr('class')).toEqual('bam');
});
+ it('should get property', function() {
+ doc.append('<div id="test" class="foo"></div>');
+ $root.dsl.element('#test').prop('className');
+ expect($root.futureResult).toEqual('foo');
+ });
+
+ it('should set property', function() {
+ doc.append('<div id="test" class="foo"></div>');
+ $root.dsl.element('#test').prop('className', 'bam');
+ expect(doc.find('div').prop('className')).toEqual('bam');
+ });
+
it('should get css', function() {
doc.append('<div id="test" style="height: 30px"></div>');
$root.dsl.element('#test').css('height');