top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration
Print Preview

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

+1 vote
80 views

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

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

+1 vote

Check if 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.

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 http://www.csiiitn.com , 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??


Useful Links with Similar Problem
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#470/147, 3rd Floor, 5th Main,
HSR Layout Sector 7,
Bangalore - 560102,
Karnataka INDIA.
QUERY HOME
...