@@ -151,7 +151,7 @@ var angularArray = {
151151 });
152152
153153 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();
155155 using('.doc-example-live tr:nth-child(3)').input('item.qty').enter('20');
156156 using('.doc-example-live tr:nth-child(3)').input('item.cost').enter('100');
157157
@@ -206,20 +206,20 @@ var angularArray = {
206206 </doc:source>
207207 <doc:scenario>
208208 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')).
211211 toEqual(['Learn Angular', 'Read Documentation', 'Check out demos',
212212 'Build cool applications']);
213213 });
214214
215215 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);
218218
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);
221221
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')).
223223 toEqual(['Read Documentation', 'Check out demos']);
224224 });
225225 </doc:scenario>
@@ -442,23 +442,23 @@ var angularArray = {
442442 });
443443
444444 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();
446446 expect(binding('people')).toBe('people = [{\n "name":"",\n "sex":null}]');
447447 });
448448
449449 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();
451451 expect(binding('people')).toBe('people = [{\n "name":"John",\n "sex":"male"}]');
452452 });
453453
454454 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();
456456 expect(binding('people')).toBe('people = [{\n "name":"Mary",\n "sex":"female"}]');
457457 });
458458
459459 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();
462462 expect(binding('people')).toBe('people = []');
463463 });
464464 </doc:scenario>
@@ -510,7 +510,7 @@ var angularArray = {
510510 });
511511
512512 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');
514514 expect(binding('items.$count(\'points==1\')')).toEqual(1);
515515 expect(binding('items.$count(\'points>1\')')).toEqual(2);
516516 });
@@ -586,23 +586,23 @@ var angularArray = {
586586 <doc:scenario>
587587 it('should be reverse ordered by aged', function() {
588588 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')).
590590 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')).
592592 toEqual(['Adam', 'Julie', 'Mike', 'Mary', 'John']);
593593 });
594594
595595 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')).
598598 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')).
600600 toEqual(['35', '10', '29', '19', '21']);
601601
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')).
604604 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')).
606606 toEqual(['Mary', 'Julie', 'Adam', 'Mike', 'John']);
607607 });
608608 </doc:scenario>
@@ -684,7 +684,7 @@ var angularArray = {
684684 </doc:source>
685685 <doc:scenario>
686686 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');
688688 expect(binding('numbers.$limitTo(limit) | json')).toEqual('[1,2,3]');
689689 });
690690
0 commit comments