Timed out waiting for asynchronous Angular tasks to finish after 31 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
This error happens when:
I use angular for web with ngrx/store. Tests failed right aftrer beginning, after browser.get(url) action done
I use angular for mobile with ionic. Tests failed on each navigation action (with ionic NavController)
I use angular for web with ng-bootstrap/modal. Test fails right after I open modal (when modal instance is opened - it return promise, which resolved only after modal is closed)
No one of this bug can be fixed with browser.waitForAngularEnabled(false) locally before action. When I return browser.waitForAngularEnabled(true) after buggy navigation/modal - tests immediately freezes with same error.
Only thing that help is turn off synchronization globally with hook
'use strict';
import { browser } from 'protractor';
import { defineSupportCode, Hooks, HookScenarioResult, CallbackStepDefinition } from 'cucumber';
/**
* Defines logic that fired before each scenario
*/
defineSupportCode(({ Before }: Hooks): void => {
/**
* Disables wait for angular protractor logic
* @param {HookScenarioResult} scenario Information about current scenario
* @param {CallbackStepDefinition} callback Callback for hook definition
*/
Before((scenario: HookScenarioResult, done: CallbackStepDefinition) => {
browser.waitForAngularEnabled(false)
.then(() => done(), done);
});
});
But after this all my programmers life turns into a nightmare. Is there a some workaround or possibility, that this will be fixed?
Hello everyone!
I have following error:
This error happens when:
I use angular for web with ngrx/store. Tests failed right aftrer beginning, after
browser.get(url)
action doneI use angular for mobile with ionic. Tests failed on each navigation action (with ionic
NavController
)I use angular for web with ng-bootstrap/modal. Test fails right after I open modal (when modal instance is opened - it return promise, which resolved only after modal is closed)
No one of this bug can be fixed with
browser.waitForAngularEnabled(false)
locally before action. When I returnbrowser.waitForAngularEnabled(true)
after buggy navigation/modal - tests immediately freezes with same error.Only thing that help is turn off synchronization globally with hook
But after this all my programmers life turns into a nightmare. Is there a some workaround or possibility, that this will be fixed?
9.6.1
5.3.2
5.2.9
chrome
High Sierra 10.13.3