2016-09-01 07:00:14 -04: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 07:37:20 -05:00
|
|
|
import {fixmeIvy, modifiedInIvy} from '@angular/private/testing';
|
2016-09-01 07:00:14 -04:00
|
|
|
import {$, ExpectedConditions, browser, by, element} from 'protractor';
|
2019-01-28 15:59:25 -05:00
|
|
|
|
|
|
|
import {verifyNoBrowserErrors} from '../../../../test-utils';
|
2016-09-01 07:00:14 -04: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 07:37:20 -05:00
|
|
|
fixmeIvy('FW-1022: JitCompilerFactory creates incorrect compiler instance')
|
2019-01-28 16:00:36 -05:00
|
|
|
.describe('ngComponentOutlet', () => {
|
|
|
|
const URL = '/ngComponentOutlet';
|
|
|
|
afterEach(verifyNoBrowserErrors);
|
2016-09-01 07:00:14 -04:00
|
|
|
|
2019-01-28 16:00:36 -05: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 07:00:14 -04:00
|
|
|
|
2019-02-03 07:37:20 -05: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 20:41:08 -05:00
|
|
|
|
2019-01-28 16:00:36 -05: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 20:41:08 -05:00
|
|
|
});
|