On Aug 17, 2013, at 10:08 AM, Garrett Wilson <[email protected]>
wrote:
> I have a table that is populated using AJAX pagination (Kaminari). What I'm
> trying to do is view this page and make sure there is certain content within
> the table. This causes a problem with my Capybara test because it doesn't
> wait for the pagination to finish before it checks the page for the content.
> I'm thinking it's something simple that I'm overlooking, but I have been
> unable to find a solution through google. I suppose I could just wait for a
> given amount of time, but this solution seems hacky to me.
>
> Here is my test:
>
> visit accounts_path
>
> #This is the text that should be inside the paginated table
> page.should have_content('[email protected]')
Does this help?
https://github.com/jnicklas/capybara#asynchronous-javascript-ajax-and-friends
This is typically why I use watir-webdriver — testing async stuff just seems
more intuitive with wait_until and wait_for.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rubyonrails-talk/D23125C4-3254-4892-A2DE-CA0D48456213%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.