diff options
Diffstat (limited to 'features')
-rw-r--r-- | features/project/issues/milestones.feature | 7 | ||||
-rw-r--r-- | features/steps/project/issues/milestones.rb | 9 | ||||
-rw-r--r-- | features/support/capybara_helpers.rb | 10 |
3 files changed, 11 insertions, 15 deletions
diff --git a/features/project/issues/milestones.feature b/features/project/issues/milestones.feature index 1af05b3c326..d121222308d 100644 --- a/features/project/issues/milestones.feature +++ b/features/project/issues/milestones.feature @@ -18,12 +18,15 @@ Feature: Project Issues Milestones Given I click link "New Milestone" And I submit new milestone "v2.3" Then I should see milestone "v2.3" - Given I click link to remove milestone + Given I click button to remove milestone + And I confirm in modal When I visit project "Shop" activity page Then I should see deleted milestone activity + @javascript Scenario: I delete new milestone - Given I click link to remove milestone + Given I click button to remove milestone + And I confirm in modal And I should see no milestones @javascript diff --git a/features/steps/project/issues/milestones.rb b/features/steps/project/issues/milestones.rb index 33a24e8913a..4ce67aa651c 100644 --- a/features/steps/project/issues/milestones.rb +++ b/features/steps/project/issues/milestones.rb @@ -3,7 +3,6 @@ class Spinach::Features::ProjectIssuesMilestones < Spinach::FeatureSteps include SharedProject include SharedPaths include SharedMarkdown - include CapybaraHelpers step 'I should see milestone "v2.2"' do milestone = @project.milestones.find_by(title: "v2.2") @@ -65,8 +64,12 @@ class Spinach::Features::ProjectIssuesMilestones < Spinach::FeatureSteps expect(page).to have_selector('#tab-issues li.issuable-row', count: 4) end - step 'I click link to remove milestone' do - confirm_modal_if_present { click_link 'Delete' } + step 'I click button to remove milestone' do + click_button 'Delete' + end + + step 'I confirm in modal' do + click_button 'Delete milestone' end step 'I should see no milestones' do diff --git a/features/support/capybara_helpers.rb b/features/support/capybara_helpers.rb deleted file mode 100644 index 647f8d087c3..00000000000 --- a/features/support/capybara_helpers.rb +++ /dev/null @@ -1,10 +0,0 @@ -module CapybaraHelpers - def confirm_modal_if_present - if Capybara.current_driver == Capybara.javascript_driver - accept_confirm { yield } - return - end - - yield - end -end |