Good day,

There is a rather large project that is written in Angular (4). Now there is a task to cover the whole e2e project and unit tests. I decided to start with e2e. I looked at all the necessary dependencies and settings, putting a fresh version next to it through Angular Cli. I registered a simple test, not serious, just checking the performance, but in the end even it does not work. There are 2 files in the / e2e directory: app.po.ts

import { browser, by, element } from 'protractor'; export class AppPage { navigateTo() { return browser.get('/'); } getParagraphText() { return 'Welcome to app!'; } } 

app.e2e-spec.ts

 import { AppPage } from './app.po'; describe('Project App', () => { let page: AppPage; beforeEach(() => { page = new AppPage(); }); it('should display welcome message', () => { page.navigateTo(); console.log('======================'); console.log(page.getParagraphText()); expect(page.getParagraphText()).toEqual('Welcome to app!'); }); }); 

In fact, such a script should end in success. But something goes wrong. I run ng e2e, build the project (ng serve), go through the initial settings, a message appears: "Jasmine started". After that, the browser (test Google Chrome) opens and the application download (preloader) begins. The console.log () is output from the app.e2e-spec.ts file and everything falls with the following errors:

E / protractor - Could not find Angular on page localhost: 49152: looking for angular exceeded

If you don’t find out what you’re looking for. Can anyone come across this?

    0