diff options
author | Stan Hu <stanhu@gmail.com> | 2015-09-17 11:04:37 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-09-17 11:04:37 +0300 |
commit | f4816372457c3b513f8707efd87ce34c9922177c (patch) | |
tree | 534be1d81e56da85514b88dd47fde25a7cf093f1 /features | |
parent | 2e9a7032cec02588484eb162717298d311770c7d (diff) | |
parent | d3d03d1362e576d194782a655cdfe9bc6ed5c596 (diff) |
Merge branch 'fix-issue-2382' into 'master'
Create a "destroyed Milestone" event and keep Milestone events around in the DB for posterity
Also fix issue where destroying a Milestone would cause odd, transient messages like "created milestone" or "imported milestone".
Now if a milestone is destroyed, at least it will indicate in the activity feed even if it's not clear which milestone was destroyed:
![image](https://gitlab.com/gitlab-org/gitlab-ce/uploads/c89cc8a0a9fa549deac433f17b890913/image.png)
Closes #2382
See merge request !1227
Diffstat (limited to 'features')
-rw-r--r-- | features/project/issues/milestones.feature | 8 | ||||
-rw-r--r-- | features/steps/project/issues/milestones.rb | 7 | ||||
-rw-r--r-- | features/steps/shared/project.rb | 5 |
3 files changed, 17 insertions, 3 deletions
diff --git a/features/project/issues/milestones.feature b/features/project/issues/milestones.feature index bfbaaec5a35..c1a20e9b488 100644 --- a/features/project/issues/milestones.feature +++ b/features/project/issues/milestones.feature @@ -12,13 +12,17 @@ Feature: Project Issues Milestones Given I click link "v2.2" Then I should see milestone "v2.2" - Scenario: I create new milestone + @javascript + Scenario: I create and delete new milestone 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 + When I visit project "Shop" activity page + Then I should see deleted milestone activity Scenario: I delete new milestone - Given I click link to remove milestone "v2.2" + Given I click link to remove milestone And I should see no milestones @javascript diff --git a/features/steps/project/issues/milestones.rb b/features/steps/project/issues/milestones.rb index 61e62c2adbd..c8708572ec6 100644 --- a/features/steps/project/issues/milestones.rb +++ b/features/steps/project/issues/milestones.rb @@ -49,6 +49,11 @@ class Spinach::Features::ProjectIssuesMilestones < Spinach::FeatureSteps create(:closed_issue, project: project, milestone: milestone) end + step 'I should see deleted milestone activity' do + expect(page).to have_content('opened milestone in') + expect(page).to have_content('destroyed milestone in') + end + When 'I click link "All Issues"' do click_link 'All Issues' end @@ -57,7 +62,7 @@ class Spinach::Features::ProjectIssuesMilestones < Spinach::FeatureSteps expect(page).to have_selector('#tab-issues li.issue-row', count: 4) end - step 'I click link to remove milestone "v2.2"' do + step 'I click link to remove milestone' do click_link 'Remove' end diff --git a/features/steps/shared/project.rb b/features/steps/shared/project.rb index ccbe8f96a4c..a9cf426852e 100644 --- a/features/steps/shared/project.rb +++ b/features/steps/shared/project.rb @@ -51,6 +51,11 @@ module SharedProject visit namespace_project_path(project.namespace, project) end + step 'I visit project "Shop" activity page' do + project = Project.find_by(name: 'Shop') + visit namespace_project_path(project.namespace, project) + end + step 'project "Shop" has push event' do @project = Project.find_by(name: "Shop") |