Skip to content

ngx-admin does not work with protractor #1647

Open
@rburgst

Description

@rburgst

Issue type

I'm submitting a ...

  • bug report
  • feature request
  • question about the decisions made in the repository

Issue description

Current behavior:
Its currently impossible to write stable protractor tests since ngx-admin seems to do some things under the hood that prevent protractor from finding out whether angular has settled or not.

If you run

ng e2e

on the following fork

rburgst@d077b25

you will get the following error

1) protractor-problem App should display welcome message
  - ScriptTimeoutError: Timed out waiting for asynchronous Angular tasks to finish after 11 seconds. This may be because the current page is not an Angular application. Please see the FAQ for more details: https://github.com/angular/protractor/blob/master/docs/timeouts.md#waiting-for-angular
  While waiting for element with locator - Locator: By(css selector, .user-name)

This happens after a trivial 2 step spec:

    await browser.get('/');
    expect(element(by.css('.user-name')).getText()).toEqual('Nick Jones');

My real app is somewhat more involved but I am getting the same kinds of issues.
Since the very same test works fine with a vanilla angular app, I am inclined to believe that ngx-admin or nebular has something to do with it.

Expected behavior:
It should be possible to write robust protractor tests that dont timeout while waiting for angular.

Steps to reproduce:

Check out the following commit / repo

rburgst@d077b25

Related code:

https://github.com/rburgst/ngx-admin

    await browser.get('/');
    expect(element(by.css('.user-name')).getText()).toEqual('Nick Jones');

Other information:

npm, node, OS, Browser

Node, npm: `node --version` and `npm --version`
node --version
> v9.5.0
yarn --version
> 1.6.0
OS: macOS (High Sierra)
Browser: Chrome

Angular, Nebular

same as on master: SHA1 bb9dccf 

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions