| 
									
										
										
										
											2013-12-24 08:48:14 +08:00
										 |  |  | casper.test.begin('Encapsulation & Inheritance', 8, function (test) { | 
					
						
							| 
									
										
										
										
											2013-10-26 06:22:22 +08:00
										 |  |  |      | 
					
						
							|  |  |  |     casper | 
					
						
							| 
									
										
										
										
											2013-12-19 13:20:00 +08:00
										 |  |  |     .start('./fixtures/extend.html', function () { | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-10-26 06:22:22 +08:00
										 |  |  |         test.assertSelectorHasText('.dir', 'directive works') | 
					
						
							|  |  |  |         test.assertSelectorHasText('.filter', 'filter works') | 
					
						
							|  |  |  |         test.assertSelectorHasText('.partial', 'partial works') | 
					
						
							| 
									
										
										
										
											2013-11-14 10:51:51 +08:00
										 |  |  |         test.assertSelectorHasText('.vm', 'component works') | 
					
						
							| 
									
										
										
										
											2013-12-18 13:45:55 +08:00
										 |  |  |         test.assertSelectorHasText('.vm-w-model', 'component with model works') | 
					
						
							| 
									
										
										
										
											2013-12-19 13:20:00 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |         test.assertSelectorHasText('#log', 'T created T ready T created C created T ready C ready', 'hook inheritance works') | 
					
						
							|  |  |  |         test.assertSelectorHasText('.cvm', 'component works', 'Child should have access to Parent options') | 
					
						
							| 
									
										
										
										
											2013-12-24 08:48:14 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |         this.evaluate(function () { | 
					
						
							|  |  |  |             test.vmData = { | 
					
						
							|  |  |  |                 selfMsg: 'replacing $data ', | 
					
						
							|  |  |  |                 msg: 'also works' | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |         }) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         test.assertSelectorHasText('.vm-w-model', 'replacing $data also works') | 
					
						
							| 
									
										
										
										
											2013-10-26 06:22:22 +08:00
										 |  |  |     }) | 
					
						
							|  |  |  |     .run(function () { | 
					
						
							|  |  |  |         test.done() | 
					
						
							|  |  |  |     }) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | }) |