From a7c1ce3fdb6842fe13f13bd059ee618b230d000a Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Sun, 13 Aug 2017 15:27:36 -0700 Subject: Fix Spinach spec for deleting branches --- features/steps/project/commits/branches.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/features/steps/project/commits/branches.rb b/features/steps/project/commits/branches.rb index ccaf3237815..080e59f789b 100644 --- a/features/steps/project/commits/branches.rb +++ b/features/steps/project/commits/branches.rb @@ -70,13 +70,12 @@ class Spinach::Features::ProjectCommitsBranches < Spinach::FeatureSteps step "I click branch 'improve/awesome' delete link" do page.within '.js-branch-improve\/awesome' do - find('.btn-remove').click - sleep 0.05 + accept_alert { find('.btn-remove').click } end end step "I should not see branch 'improve/awesome'" do - expect(page.all(visible: true)).not_to have_content 'improve/awesome' + expect(page).to have_css('.js-branch-improve\\/awesome', visible: :hidden) end def select_branch(branch_name) -- cgit v1.2.1