Closed tisto closed 7 years ago
@tisto I don't work with angular2 yet but I can look into making it angular 2 compatible.
@emanlove that would be awesome! Let me know if there is anything I can do to help.
@emanlove any updates on this? Would portions of this library still be compatible?
@dh-lex, @tisto: I am starting to look at this again as I have an Angular2 app that needs this. I need it to be compatible with both Angular 1 as well as Angular 2 and 3 (or 2+) I plan on making that work. And relooking at protractor I think this is done within a single Protractor library which works for both 1 and 2+ so this might be a little straight forward (hopefully!)
So looking at the current state of Protractor I could move in some form of the waitForAngular function. What is causing me to think is the callbacks. If one reads through my write-up on the self testing of the AngularJS library one will see that I use python execute_script instead of execute_async_script for a couple reasons. But this then blocks and so I have been considering how to make this async. The question I have is what to do first. I think I am going to put this Angular 2+ code into the method I currently have with the synchronous call and then tackle the other issue of async vs sync.
@dh-lex @tisto Initial commit [9ac7bdcfc8728c229d28176db1bc9b47c080c63f] for Angular 2 support. I have written up some more notes on the development and testing of these changes under TESTING.rst. Preliminary tests are not good as the implicit waits are timing out. I am thinking this may be due to the model used for Angular 1 and notifyWhenNoOutstandingRequests does not work for getAngularTestability. Or it could be some other factor(s).
@tisto Is there a public Plone site that is running Angular 2 that I can try out some AngularJSLibrary changes against?
There is https://kitconcept.com/blog. Though, we use server-side rendering there. Not sure if that makes a difference for your library checks. cc @sneridagh
I have cut the 0.0.5 release with Angular 2+ support. This is using the window.getAngularTestibility() function. It does not though support window.getAllAngularTestabilities() nor, what I believe to be AngularJS functionality, window.angular.getTestibility(). I am still trying to understand all these apis. Also the root selector is hard coded as [ng-app]
so I am going to work on this issue [#16] next. If anyone gets a chance to try it out on their sites I would be interested in your experience. And note again you may need to change the root selector.
@emanlove Any plans to make this plugin work with Angular 2?