angular/aio/content/examples/dynamic-component-loader/e2e/src/app.e2e-spec.ts
Matthieu Riegler 3e0e6ed60f docs: update Dynamic Component loader docs to rely on ngComponentOutlet (#49915)
With #51148, the `ngComponentOutlet` directive now supports inputs.
This allows a less verbose and simpler API to instantiate components dynamicaly.

Fixes #49875

PR Close #49915
2023-09-07 10:03:22 -07:00

20 lines
770 B
TypeScript

import { browser, element, by } from 'protractor';
describe('Dynamic Component Loader', () => {
// The tests trigger periodic asynchronous operations (via `setInterval()`), which will prevent
// the app from stabilizing. See https://angular.io/api/core/ApplicationRef#is-stable-examples
// for more details.
// To allow the tests to complete, we will disable automatically waiting for the Angular app to
// stabilize.
beforeAll(() => browser.waitForAngularEnabled(false));
afterAll(() => browser.waitForAngularEnabled(true));
beforeEach(() => browser.get(''));
it('should load ad banner', async () => {
const headline = element(by.cssContainingText('h3', 'Featured Hero Profile'));
expect(await headline.isPresent()).toBe(true);
});
});