2017-02-22 18:13:21 +00:00
|
|
|
import { browser, element, by } from 'protractor';
|
|
|
|
|
2020-07-30 13:03:13 +03:00
|
|
|
describe('Dynamic Component Loader', () => {
|
2017-02-22 18:13:21 +00:00
|
|
|
|
2020-11-23 20:17:00 +02:00
|
|
|
// 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(''));
|
2017-02-22 18:13:21 +00:00
|
|
|
|
2020-11-23 20:17:00 +02:00
|
|
|
it('should load ad banner', async () => {
|
|
|
|
const headline = element(by.cssContainingText('h3', 'Featured Hero Profile'));
|
|
|
|
const name = element(by.cssContainingText('h4', 'Bombasto'));
|
|
|
|
const bio = element(by.cssContainingText('p', 'Brave as they come'));
|
2017-02-22 18:13:21 +00:00
|
|
|
|
2020-11-23 20:17:00 +02:00
|
|
|
expect(await headline.isPresent()).toBe(true);
|
|
|
|
expect(await name.isPresent()).toBe(true);
|
|
|
|
expect(await bio.isPresent()).toBe(true);
|
2017-02-22 18:13:21 +00:00
|
|
|
});
|
|
|
|
});
|