Kari Ikonen
Kari Ikonen
require 'active_support' Hmm.. was it with underscore. I always forget, since gem naming and needed require had some inconsistencies in rails gems
http://stackoverflow.com/questions/4238867/how-do-i-use-active-support-core-extensions ```ruby require 'active_support/all' ```
There is some base logic in this gem, which is supposed to be waiting if angularjs is ready (lib/angular/waiter.rb). But now when I'm looking into logic, it feels me that...
okey, miss recalled logic... ng_wait logic is trying to wait for stable point in angularjs via "angular.getTestability.whenStable()", and by default this is done for every "ng_xxx" operation. Perhaps, logic should...
Not 100% sure if it will help you, but I changed "ng_wait" semantics in two ways 1) Angular.wait_time determines wait time for timeout in waiting (this in case capybara normal...
At least there should be "ng_wait" before ``` expect(page).to have_content('Some model is saved!') ``` Actually I'm guessing that "save" is trickering async xhr operation, after which ui is updated, thus...
After visit_page you want to say ng_wait to wait angular to br ready so that it has change to react to DOM changes and events
Yes, ng_wait tries to wait that angularjs is ready. But does readiness of your app depend from asyn xhr calls in startup? I would suggest adding redundant console logging around...
ng_eval("some expr") could be also useful to track down the issue. I.e. via https://www.ng-book.com/p/Debugging-AngularJS/
Is require for capara-ng is in spec helper? @see https://github.com/kikonen/host/blob/master/spec/rails_helper.rb