| 
									
										
										
										
											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-02-03 13:37:20 +01:00
										 |  |  | import {fixmeIvy, 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-02-03 13:37:20 +01:00
										 |  |  | fixmeIvy('FW-1022: JitCompilerFactory creates incorrect compiler instance') | 
					
						
							| 
									
										
										
										
											2019-01-28 22:00:36 +01:00
										 |  |  |     .describe('ngComponentOutlet', () => { | 
					
						
							|  |  |  |       const URL = '/ngComponentOutlet'; | 
					
						
							|  |  |  |       afterEach(verifyNoBrowserErrors); | 
					
						
							| 
									
										
										
										
											2016-09-01 14:00:14 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-01-28 22:00:36 +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!']); | 
					
						
							|  |  |  |         }); | 
					
						
							| 
									
										
										
										
											2016-09-01 14:00:14 +03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-03 13:37:20 +01:00
										 |  |  |         modifiedInIvy('Different behavior for projectableNodes in ViewContainerRef.createComponent') | 
					
						
							|  |  |  |             .it('should render complete', () => { | 
					
						
							|  |  |  |               browser.get(URL); | 
					
						
							|  |  |  |               waitForElement('ng-component-outlet-complete-example'); | 
					
						
							|  |  |  |               expect(element.all(by.css('complete-component')).getText()).toEqual([ | 
					
						
							|  |  |  |                 'Complete: AhojSvet!' | 
					
						
							|  |  |  |               ]); | 
					
						
							|  |  |  |             }); | 
					
						
							| 
									
										
										
										
											2017-01-25 17:41:08 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-01-28 22:00:36 +01:00
										 |  |  |         it('should render other module', () => { | 
					
						
							|  |  |  |           browser.get(URL); | 
					
						
							|  |  |  |           waitForElement('ng-component-outlet-other-module-example'); | 
					
						
							|  |  |  |           expect(element.all(by.css('other-module-component')).getText()).toEqual([ | 
					
						
							|  |  |  |             'Other Module Component!' | 
					
						
							|  |  |  |           ]); | 
					
						
							|  |  |  |         }); | 
					
						
							|  |  |  |       }); | 
					
						
							| 
									
										
										
										
											2017-01-25 17:41:08 -08:00
										 |  |  |     }); |