| 
									
										
										
										
											2016-09-01 14:00:14 +03:00
										 |  |  | /** | 
					
						
							|  |  |  |  * @license | 
					
						
							|  |  |  |  * Copyright Google Inc. All Rights Reserved. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Use of this source code is governed by an MIT-style license that can be | 
					
						
							|  |  |  |  * found in the LICENSE file at https://angular.io/license
 | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-03-04 14:59:52 +01:00
										 |  |  | import {modifiedInIvy} from '@angular/private/testing'; | 
					
						
							| 
									
										
										
										
											2016-09-01 14:00:14 +03:00
										 |  |  | import {$, ExpectedConditions, browser, by, element} from 'protractor'; | 
					
						
							| 
									
										
										
										
											2019-01-28 21:59:25 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | import {verifyNoBrowserErrors} from '../../../../test-utils'; | 
					
						
							| 
									
										
										
										
											2016-09-01 14:00:14 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | function waitForElement(selector: string) { | 
					
						
							|  |  |  |   const EC = ExpectedConditions; | 
					
						
							|  |  |  |   // Waits for the element with id 'abc' to be present on the dom.
 | 
					
						
							|  |  |  |   browser.wait(EC.presenceOf($(selector)), 20000); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-03-04 14:59:52 +01:00
										 |  |  | describe('ngComponentOutlet', () => { | 
					
						
							|  |  |  |   const URL = '/ngComponentOutlet'; | 
					
						
							|  |  |  |   afterEach(verifyNoBrowserErrors); | 
					
						
							| 
									
										
										
										
											2016-09-01 14:00:14 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-03-04 14:59:52 +01:00
										 |  |  |   describe('ng-component-outlet-example', () => { | 
					
						
							|  |  |  |     it('should render simple', () => { | 
					
						
							|  |  |  |       browser.get(URL); | 
					
						
							|  |  |  |       waitForElement('ng-component-outlet-simple-example'); | 
					
						
							|  |  |  |       expect(element.all(by.css('hello-world')).getText()).toEqual(['Hello World!']); | 
					
						
							|  |  |  |     }); | 
					
						
							| 
									
										
										
										
											2017-01-25 17:41:08 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-03-04 14:59:52 +01:00
										 |  |  |     modifiedInIvy('Different behavior for projectableNodes in ViewContainerRef.createComponent') | 
					
						
							|  |  |  |         .it('should render complete', () => { | 
					
						
							| 
									
										
										
										
											2019-01-28 22:00:36 +01:00
										 |  |  |           browser.get(URL); | 
					
						
							| 
									
										
										
										
											2019-03-04 14:59:52 +01:00
										 |  |  |           waitForElement('ng-component-outlet-complete-example'); | 
					
						
							|  |  |  |           expect(element.all(by.css('complete-component')).getText()).toEqual([ | 
					
						
							|  |  |  |             'Complete: AhojSvet!' | 
					
						
							| 
									
										
										
										
											2019-01-28 22:00:36 +01:00
										 |  |  |           ]); | 
					
						
							|  |  |  |         }); | 
					
						
							| 
									
										
										
										
											2019-03-04 14:59:52 +01:00
										 |  |  |   }); | 
					
						
							|  |  |  | }); |