From 5c887ddb66bdd0daa4f4a98af0c6e76d4aec0d70 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Tue, 2 Nov 2010 16:25:43 -0700 Subject: adding textarea() DSL for scenario runner --- test/scenario/dslSpec.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'test') 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(''); + 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/); + }); + }); }); }); -- cgit v1.2.3