-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Angular dependency to be removed #2460
Comments
Probably better idea is to implement an ability to create Framework/App specific waiter. var react = {
connect: function() {
// here is dance with angular.resumeBootstrap and similar stuff
},
wait: ..., // similar to waitForAngular implementation here
addMockModule: ....
removeMockModule: ....
}; PROS:
And by default use waiter for |
The way that we'd like to implement this is with a separate process that proxies commands to webdriver. Then, that process will take care of all waiting commands, and will have the option to swap them out. I think this will clean up a lot of things in Protractor both with Angular apps and in general. This is on our timeline for end of 2015. |
It would also be nice to use protractor's angular logic in other selenium wrappers. For example, I work on QA scripts in both ruby and scala that are now hitting pages with angular. I'm not sure if this means moving the code in https://github.com/angular/protractor/blob/master/lib/clientsidescripts.js and writing your own code that calls the functions in that file. I just don't want to write my own code that waits for angular when I know that it already exists. |
As Protractor is not meant to be used exclusively with Angular it would be nice to avoid any 'Angular' dependency and rather let angular implement a Protractor API to become properly Protractor testable and utilize the waitStable testability feature.
We have been successfully using Protractor to test a ReactJS application which implements the necessary stuff from the window.angular for Protractor to work. The following code is the one that works and simulates the whenStable() functionality:
The Protractor specific API could look something like (not completely accurate but should be enough to get what I mean):
The text was updated successfully, but these errors were encountered: