This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include CapybaraAccessories | |
# This step occurs after an item was added to the cart through XHR | |
# It must wait for the call to return and for the UI to update. | |
# A badge must become visible and contain the number of items in cart. | |
# Without this kind of wait code Capybara's waiting features (2.2.1) | |
# still miss the update and fail the test. | |
Then(/^I see a caddie badge with (\d+) item\(s\)$/) do |count| | |
wait_for{page.find('#count')}.should have_content(count) |
NewerOlder