Ruby on Rails Saturday, August 17, 2013

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('test.test@mail.com')

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/5b2387dd-60f6-4005-9c24-057c1f4f5d50%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment