I spent a day on this and have not made progress, I am really starting to wonder if this is possible.
I use Angular with Headroom to handle a menu that disappears when scrolling down. My testing is done using Protractor using PhantomJS, and here the fun begins.
PhantomJS does not support .bind() , but Headroom uses it everywhere, which means I need to polyfill it. This should not be a problem, but I cannot get it to work.
I think my problem is that no matter where I run the polyfill function, PhantomJS and the tested page are already loaded, so it's already too late, the Headroom will not be loaded due to lack of .bind() .
Is there a way to run these methods before the page loads? I know that I can add them to my application using the script tag in my head, but I would prefer not to add something to the whole application, which will be used only by the testing environment.
angularjs phantomjs polyfills protractor angularjs-e2e
gCardinal
source share