Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Angular (not AngularJS) #450

Open
magynhard opened this issue Sep 21, 2017 · 4 comments
Open

Add support for Angular (not AngularJS) #450

magynhard opened this issue Sep 21, 2017 · 4 comments

Comments

@magynhard
Copy link

I'm going to use page-object to test Angular apps.

As far as i can see, there is support for AngularJS (ajax calls count), but not for Angular (2+).
https://github.com/cheezy/page-object/tree/master/lib/page-object/javascript

Is there a plan to support angular?

@vveliev
Copy link
Contributor

vveliev commented Sep 21, 2017

create PR ;) it's should not be hard if Angular have ajax count buildin

@titusfortner
Copy link
Contributor

There is a watir_angular gem that is still in beta that needs to have requirements honed. For instance I don't like the way it is currently initialized. But It should already be compatible with page object gem. If it isn't let's get it fixed so it is. Would love help on it since I don't actually use angular. :-)

@cheezy
Copy link
Owner

cheezy commented Sep 22, 2017

@entwanderer do you know the JavaScript that will return the number of current ajax requests? In AngularJS it is 'angular.element(document.body).injector().get('$http').pendingRequests.length;'. If you can find the equivalent code for Angular then I can easily add it.

@SeanMNorton
Copy link

SeanMNorton commented Dec 4, 2019

window.getAllAngularTestabilities().filter(zone=>!zone.isStable()).length;

isStable() checks that pendingCount and pendingMacroTasks are both zero and does not return the number of requests pending
Getting the actual number of pending requests has been deprecated.

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

No branches or pull requests

6 participants