aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAndres Ornelas2010-06-09 12:35:40 -0700
committerAndres Ornelas2010-06-09 12:35:40 -0700
commitfe03ea0d1f8814817bee5a35d745db16858eb490 (patch)
tree4a230103a90944c0ea05c09f59fca06018cb9ef7 /test
parentcb5d21192787985bbff20b369e885639de253345 (diff)
downloadangular.js-fe03ea0d1f8814817bee5a35d745db16858eb490.tar.bz2
add repeater DSL and fix typo
Diffstat (limited to 'test')
-rw-r--r--test/scenario/DSLSpec.js14
-rw-r--r--test/scenario/RunnerSpec.js2
2 files changed, 14 insertions, 2 deletions
diff --git a/test/scenario/DSLSpec.js b/test/scenario/DSLSpec.js
index bed1f008..0cce7b75 100644
--- a/test/scenario/DSLSpec.js
+++ b/test/scenario/DSLSpec.js
@@ -40,4 +40,16 @@ describe("DSL", function() {
expect(lastDocument.find(':radio:checked').val()).toEqual('female');
});
});
-}); \ No newline at end of file
+
+ describe('expect', function() {
+ var dslExpect = angular.scenario.dsl.expect;
+ describe('repeater', function() {
+ it('should check the count of repeated elements', function() {
+ dslExpect.repeater('.repeater-row').count.toEqual(2);
+ expect(lastStep.name).toEqual("Expect to see 2 items repeated with selector '.repeater-row'");
+ var html = "<div class='repeater-row'>a</div><div class='repeater-row'>b</div>";
+ executeStep(lastStep, html);
+ });
+ });
+ });
+});
diff --git a/test/scenario/RunnerSpec.js b/test/scenario/RunnerSpec.js
index 35d74f51..030bdc06 100644
--- a/test/scenario/RunnerSpec.js
+++ b/test/scenario/RunnerSpec.js
@@ -36,7 +36,7 @@ describe('Runner', function(){
expect(spec.name).toEqual('describe name: it should text');
});
- it('should camplain on duplicate it', angular.noop);
+ it('should complain on duplicate it', angular.noop);
it('should create a failing step if there is a javascript error', function(){
var spec;
Describe('D1', function(){