aboutsummaryrefslogtreecommitdiffstats
path: root/test/scenario/dslSpec.js
diff options
context:
space:
mode:
authorVojta Jina2011-06-02 20:15:43 +0200
committerIgor Minar2011-06-02 12:51:12 -0700
commit9a6967755116f14b6f27fc00b5976b58f0bc6fcd (patch)
tree18aaeaff178f7cb3dd8dd92917c2195b384f542e /test/scenario/dslSpec.js
parentb6db58c6472002cd81821a106816398942d4d0a4 (diff)
downloadangular.js-9a6967755116f14b6f27fc00b5976b58f0bc6fcd.tar.bz2
Fix CSS tests on Opera
Opera translates name colors to numbers (red -> #ff0000) Other browsers like FF or Chrome translate number to rgb (#ff0000 -> rgb(255, 0, 0) So avoiding colors in tests is probably the easiest solution...
Diffstat (limited to 'test/scenario/dslSpec.js')
-rw-r--r--test/scenario/dslSpec.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/scenario/dslSpec.js b/test/scenario/dslSpec.js
index f0534c2c..4e0042d0 100644
--- a/test/scenario/dslSpec.js
+++ b/test/scenario/dslSpec.js
@@ -273,15 +273,15 @@ describe("angular.scenario.dsl", function() {
});
it('should get css', function() {
- doc.append('<div id="test" style="border: 1px solid red"></div>');
- $root.dsl.element('#test').css('border');
- expect($root.futureResult).toMatch(/red/);
+ doc.append('<div id="test" style="height: 30px"></div>');
+ $root.dsl.element('#test').css('height');
+ expect($root.futureResult).toMatch(/30px/);
});
it('should set css', function() {
- doc.append('<div id="test" style="border: 1px solid red"></div>');
- $root.dsl.element('#test').css('border', '1px solid green');
- expect(doc.find('#test').css('border')).toMatch(/green/);
+ doc.append('<div id="test" style="height: 10px"></div>');
+ $root.dsl.element('#test').css('height', '20px');
+ expect(doc.find('#test').css('height')).toEqual('20px');
});
it('should add all jQuery key/value methods', function() {