top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Capybara test dosn't wait for the pagination to finish?

+1 vote

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('')
posted Aug 18, 2013 by Sonu Jindal

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Check if this help?

This is typically why I use watir-webdriver — testing async stuff just seems more intuitive with wait_until and wait_for.

answer Aug 18, 2013 by Naveena Garg
Similar Questions
+1 vote

I was working on a test app and everything was going great. However now when I run "rails server" and none of the changes to the controller files are reflected.

If I make changes to HTML files, those are reflected. And yes, I'm sure am in the right directory editing the correct files.

I can get rid of actions in the controller files and it still works fine. Do I have to do something after I change the ruby files? I thought I could just save them then run 'rails server'... It had seemed to be working doing just that previously.

+7 votes

I have just launched a website at , Its main asset is Technical Discussion Forum. It totally based on hashchange links. I want to create sitemap(XML File) for my website and submit to Google. Is there anyone that know how to do that? Or is there any online service providers??