diff options
| author | Igor Minar | 2010-11-02 16:25:43 -0700 | 
|---|---|---|
| committer | Igor Minar | 2010-11-03 09:47:21 -0700 | 
| commit | 5c887ddb66bdd0daa4f4a98af0c6e76d4aec0d70 (patch) | |
| tree | 7dfc3867d1832ec6e1562b5d99790aaaef48f7cc /test/scenario | |
| parent | 0bd4a473a717d5ed9b9c07fbdbc5c336beeef4e5 (diff) | |
| download | angular.js-5c887ddb66bdd0daa4f4a98af0c6e76d4aec0d70.tar.bz2 | |
adding textarea() DSL for scenario runner
Diffstat (limited to 'test/scenario')
| -rw-r--r-- | test/scenario/dslSpec.js | 16 | 
1 files changed, 16 insertions, 0 deletions
diff --git a/test/scenario/dslSpec.js b/test/scenario/dslSpec.js index fd22303e..0338e884 100644 --- a/test/scenario/dslSpec.js +++ b/test/scenario/dslSpec.js @@ -486,5 +486,21 @@ describe("angular.scenario.dsl", function() {        });      }); + +    describe('Textarea', function() { + +      it('should change value in textarea', function() { +        doc.append('<textarea name="test.textarea">something</textarea>'); +        var chain = $root.dsl.textarea('test.textarea'); +        chain.enter('foo'); +        expect(_jQuery('textarea[name="test.textarea"]').val()).toEqual('foo'); +      }); + +      it('should return error if no textarea exists', function() { +        var chain = $root.dsl.input('test.textarea'); +        chain.enter('foo'); +        expect($root.futureError).toMatch(/did not match/); +      }); +    });    });  });  | 
