04 Feb '14, 2pm

Automatically Wait for AJAX with Capybara

Automatically wait for AJAX with Capybara Gabe Berke-Williams February 04, 2014 rails testing Capybara's very good about waiting for AJAX . For example, this code will keep checking the page for the element for Capybara.default_wait_time seconds, allowing AJAX calls to finish: expect(page).to have_css('.username', text: 'Gabe B-W') But there are times when that's not enough. For example, in this code: visit users_path click_link 'Add Gabe as friend via AJAX' reload_page expect(page).to have_css('.favorite', text: 'Gabe') We have a race condition between click_link and reload_page . Sometimes the AJAX call will go through before Capybara reloads the page, and sometimes it won't. This kind of nondeterministic test can be very difficult to debug, so I added a little helper. Capybara's Little Helper Here's the helper, via Coderwall : # spec/support/wait_for_ajax.rb module Wait...

Full article: http://robots.thoughtbot.com/automatically-wait-for-ajax-...

Tweets

Who can't wait for the Air Jordan 6 "Infrared 2...

twitter.com 05 Feb '14, 8pm

To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content,...

Hoping to snag an @BMWi 3? Wait list is now ove...

green.autoblog.com 04 Feb '14, 1pm

BMW has promised a FREE loaner regular 3-series (or was it 1 series) for every owner who wants to make a longer trip. At l...

"@ComplexSneakers: These Air Yeezy IIs have nev...

complex.com 04 Feb '14, 8pm

If you are not redirected automatically, please click here: http://www.complex.com/sneakers/2014/02/nike-air-yeezy-ii-unre...

A nice and clean way to use #capybara's parser in any of your tests. It's so easy! #ruby #rails #tdd

A nice and clean way to use #capybara's parser ...

robots.thoughtbot.com 09 Feb '14, 7pm

Use Capybara On Any HTML Fragment Or Page Nick Quaranto July 26, 2011 testing ruby rails I was upgrading Gemcutter to Cucu...

How to react when someone steps on your sneaker...

complex.com 06 Feb '14, 2pm

If you are not redirected automatically, please click here: http://www.complex.com/sneakers/2014/02/how-to-react-when-some...

Current status: waiting for “Javascripty” stuff...

pivotallabs.com 04 Feb '14, 11pm

A little ditty that makes it really easy to wait for something Javascripty to happen…like a Javascript dialog to appear th...

2 Chainz x adidas:

complex.com 06 Feb '14, 10pm

If you are not redirected automatically, please click here: http://www.complex.com/sneakers/2014/02/2-chainz-adidas-signat...

A skate shop is making people who don't skate p...

complex.com 06 Feb '14, 3am

If you are not redirected automatically, please click here: http://www.complex.com/sneakers/2014/02/indiana-skate-shop-nik...

There's a "Tiffany" Dunk Billboard in Los Angeles

complex.com 07 Feb '14, 8pm

If you are not redirected automatically, please click here: http://www.complex.com/sneakers/2014/02/theres-a-tiffany-dunk-...