@@ -151,7 +151,7 @@ var angularArray = {
151
151
});
152
152
153
153
it('should add an entry and recalculate', function() {
154
- element('.doc-example a:contains("add item")').click();
154
+ element('.doc-example-live a:contains("add item")').click();
155
155
using('.doc-example-live tr:nth-child(3)').input('item.qty').enter('20');
156
156
using('.doc-example-live tr:nth-child(3)').input('item.cost').enter('100');
157
157
@@ -206,20 +206,20 @@ var angularArray = {
206
206
</doc:source>
207
207
<doc:scenario>
208
208
it('should initialize the task list with for tasks', function() {
209
- expect(repeater('.doc-example ul li', 'task in tasks').count()).toBe(4);
210
- expect(repeater('.doc-example ul li', 'task in tasks').column('task')).
209
+ expect(repeater('.doc-example-live ul li', 'task in tasks').count()).toBe(4);
210
+ expect(repeater('.doc-example-live ul li', 'task in tasks').column('task')).
211
211
toEqual(['Learn Angular', 'Read Documentation', 'Check out demos',
212
212
'Build cool applications']);
213
213
});
214
214
215
215
it('should initialize the task list with for tasks', function() {
216
- element('.doc-example ul li a:contains("X"):first').click();
217
- expect(repeater('.doc-example ul li', 'task in tasks').count()).toBe(3);
216
+ element('.doc-example-live ul li a:contains("X"):first').click();
217
+ expect(repeater('.doc-example-live ul li', 'task in tasks').count()).toBe(3);
218
218
219
- element('.doc-example ul li a:contains("X"):last').click();
220
- expect(repeater('.doc-example ul li', 'task in tasks').count()).toBe(2);
219
+ element('.doc-example-live ul li a:contains("X"):last').click();
220
+ expect(repeater('.doc-example-live ul li', 'task in tasks').count()).toBe(2);
221
221
222
- expect(repeater('.doc-example ul li', 'task in tasks').column('task')).
222
+ expect(repeater('.doc-example-live ul li', 'task in tasks').column('task')).
223
223
toEqual(['Read Documentation', 'Check out demos']);
224
224
});
225
225
</doc:scenario>
@@ -442,23 +442,23 @@ var angularArray = {
442
442
});
443
443
444
444
it('should create an empty record when "add empty" is clicked', function() {
445
- element('.doc-example a:contains("add empty")').click();
445
+ element('.doc-example-live a:contains("add empty")').click();
446
446
expect(binding('people')).toBe('people = [{\n "name":"",\n "sex":null}]');
447
447
});
448
448
449
449
it('should create a "John" record when "add \'John\'" is clicked', function() {
450
- element('.doc-example a:contains("add \'John\'")').click();
450
+ element('.doc-example-live a:contains("add \'John\'")').click();
451
451
expect(binding('people')).toBe('people = [{\n "name":"John",\n "sex":"male"}]');
452
452
});
453
453
454
454
it('should create a "Mary" record when "add \'Mary\'" is clicked', function() {
455
- element('.doc-example a:contains("add \'Mary\'")').click();
455
+ element('.doc-example-live a:contains("add \'Mary\'")').click();
456
456
expect(binding('people')).toBe('people = [{\n "name":"Mary",\n "sex":"female"}]');
457
457
});
458
458
459
459
it('should delete a record when "X" is clicked', function() {
460
- element('.doc-example a:contains("add empty")').click();
461
- element('.doc-example li a:contains("X"):first').click();
460
+ element('.doc-example-live a:contains("add empty")').click();
461
+ element('.doc-example-live li a:contains("X"):first').click();
462
462
expect(binding('people')).toBe('people = []');
463
463
});
464
464
</doc:scenario>
@@ -510,7 +510,7 @@ var angularArray = {
510
510
});
511
511
512
512
it('should recalculate when updated', function() {
513
- using('.doc-example li:first-child').input('item.points').enter('23');
513
+ using('.doc-example-live li:first-child').input('item.points').enter('23');
514
514
expect(binding('items.$count(\'points==1\')')).toEqual(1);
515
515
expect(binding('items.$count(\'points>1\')')).toEqual(2);
516
516
});
@@ -586,23 +586,23 @@ var angularArray = {
586
586
<doc:scenario>
587
587
it('should be reverse ordered by aged', function() {
588
588
expect(binding('predicate')).toBe('Sorting predicate = -age');
589
- expect(repeater('.doc-example table', 'friend in friends').column('friend.age')).
589
+ expect(repeater('.doc-example-live table', 'friend in friends').column('friend.age')).
590
590
toEqual(['35', '29', '21', '19', '10']);
591
- expect(repeater('.doc-example table', 'friend in friends').column('friend.name')).
591
+ expect(repeater('.doc-example-live table', 'friend in friends').column('friend.name')).
592
592
toEqual(['Adam', 'Julie', 'Mike', 'Mary', 'John']);
593
593
});
594
594
595
595
it('should reorder the table when user selects different predicate', function() {
596
- element('.doc-example a:contains("Name")').click();
597
- expect(repeater('.doc-example table', 'friend in friends').column('friend.name')).
596
+ element('.doc-example-live a:contains("Name")').click();
597
+ expect(repeater('.doc-example-live table', 'friend in friends').column('friend.name')).
598
598
toEqual(['Adam', 'John', 'Julie', 'Mary', 'Mike']);
599
- expect(repeater('.doc-example table', 'friend in friends').column('friend.age')).
599
+ expect(repeater('.doc-example-live table', 'friend in friends').column('friend.age')).
600
600
toEqual(['35', '10', '29', '19', '21']);
601
601
602
- element('.doc-example a:contains("Phone")+a:contains("^")').click();
603
- expect(repeater('.doc-example table', 'friend in friends').column('friend.phone')).
602
+ element('.doc-example-live a:contains("Phone")+a:contains("^")').click();
603
+ expect(repeater('.doc-example-live table', 'friend in friends').column('friend.phone')).
604
604
toEqual(['555-9876', '555-8765', '555-5678', '555-4321', '555-1212']);
605
- expect(repeater('.doc-example table', 'friend in friends').column('friend.name')).
605
+ expect(repeater('.doc-example-live table', 'friend in friends').column('friend.name')).
606
606
toEqual(['Mary', 'Julie', 'Adam', 'Mike', 'John']);
607
607
});
608
608
</doc:scenario>
@@ -684,7 +684,7 @@ var angularArray = {
684
684
</doc:source>
685
685
<doc:scenario>
686
686
it('should limit the numer array to first three items', function() {
687
- expect(element('.doc-example input[name=limit]').val()).toBe('3');
687
+ expect(element('.doc-example-live input[name=limit]').val()).toBe('3');
688
688
expect(binding('numbers.$limitTo(limit) | json')).toEqual('[1,2,3]');
689
689
});
690
690
0 commit comments