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-03-04 08:59:52 -05:00
|
|
|
import {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-03-04 08:59:52 -05:00
|
|
|
describe('ngComponentOutlet', () => {
|
|
|
|
const URL = '/ngComponentOutlet';
|
|
|
|
afterEach(verifyNoBrowserErrors);
|
2016-09-01 07:00:14 -04:00
|
|
|
|
2019-03-04 08:59:52 -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!']);
|
|
|
|
});
|
2017-01-25 20:41:08 -05:00
|
|
|
|
2019-03-04 08:59:52 -05:00
|
|
|
modifiedInIvy('Different behavior for projectableNodes in ViewContainerRef.createComponent')
|
|
|
|
.it('should render complete', () => {
|
2019-01-28 16:00:36 -05:00
|
|
|
browser.get(URL);
|
2019-03-04 08:59:52 -05:00
|
|
|
waitForElement('ng-component-outlet-complete-example');
|
|
|
|
expect(element.all(by.css('complete-component')).getText()).toEqual([
|
|
|
|
'Complete: AhojSvet!'
|
2019-01-28 16:00:36 -05:00
|
|
|
]);
|
|
|
|
});
|
2019-03-04 08:59:52 -05:00
|
|
|
});
|
|
|
|
});
|