Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Protractor fails if HTTP Service return 404 error #4533

Closed
Bartosz-D3V opened this issue Oct 9, 2017 · 2 comments
Closed

Protractor fails if HTTP Service return 404 error #4533

Bartosz-D3V opened this issue Oct 9, 2017 · 2 comments

Comments

@Bartosz-D3V
Copy link

Bug report

  • Node Version: 6.10.3
  • Protractor Version: 5.1.2
  • Angular Version: 4
  • Browser(s): Chrome v. 61
  • Operating System and Version Windows 10
  • Your protractor configuration file: Standard, generated by Angular CLI
  • A relevant example test: Example, generated by Angular CLI (simple getter for HTML element is fine, for the sake of simplicity)
  • Output from running the test:
Failed: 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
  • Steps to reproduce the bug:
    1. Generate the sample, Angular project (for example using Angular CLI)
    2. Create a simple service with GET request (without backend, so the response will be 404)
    3. Inject the service into the component that you run E2E tests against
    4. Run protractor

Protractor will return the above error. Setting timeout in the HTTP service does not seem to resolve the issue.
Interestingly, if I focus the browser opened by a protractor (instead of running it in the background) the tests will execute correctly.
Also, increasing the timeout does not seem to resolve the issue.

@NickTomlin
Copy link
Contributor

Hi there!

Your question is better suited for StackOverflow or Gitter. Please ask a question there with the 'protractor' tag or post in the Gitter Channel to get help.

From the the getting help section of the README:

Please ask usage and debugging questions on StackOverflow (use the "protractor" tag) or in the Angular discussion group. (Please do not ask support questions here on Github.)

Thanks!

@textbook
Copy link

I had a similar issue, seems to be related to #4584 - in the meantime you can browser.waitForAngularEnabled(false) to avoid it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants