From 171c4dde134be5849402102073f34ed6d7a0f0d5 Mon Sep 17 00:00:00 2001 From: kikito Date: Wed, 24 Feb 2016 11:25:37 +0100 Subject: [PATCH] forces capybara to wait after pushing a button by adding an extra expectation --- spec/features/comments/debates_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/features/comments/debates_spec.rb b/spec/features/comments/debates_spec.rb index a2a3eaaf3..b8e7295a7 100644 --- a/spec/features/comments/debates_spec.rb +++ b/spec/features/comments/debates_spec.rb @@ -300,6 +300,8 @@ feature 'Commenting debates' do # The button's text should now be "..." # This should be checked before the Ajax request is finished expect(page).to_not have_button 'Publish comment' + + expect(page).to have_content('Testing submit button!') end feature "Moderators" do