Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@gitlab.com>2015-03-17 19:45:04 +0300
committerDmitriy Zaporozhets <dzaporozhets@gitlab.com>2015-03-17 19:45:04 +0300
commit9162e34bb078be9f4fb35b7e43f89c926dc3bcd8 (patch)
tree7d93fd0f30f83fb2fb2e502a4891aa2f1571fbc7 /features
parent409097bd7e0f5857cf0bc5462bd47484980ec787 (diff)
parent22fcb2f418ed6a2c7e68c0cd3ec2d414510ad4ec (diff)
Merge branch 'issue_subscription' into 'master'
Subscription to issue/mr Fixes #1911 and #1909 ![joxi_screenshot_1426601822159](https://dev.gitlab.org/gitlab/gitlabhq/uploads/53021bc5783271322ab2dfba7598eaa3/joxi_screenshot_1426601822159.png) ![joxi_screenshot_1426601836423](https://dev.gitlab.org/gitlab/gitlabhq/uploads/244ff360fbd6f30980f8dad699400814/joxi_screenshot_1426601836423.png) See merge request !1702
Diffstat (limited to 'features')
-rw-r--r--features/project/issues/issues.feature8
-rw-r--r--features/project/merge_requests.feature7
-rw-r--r--features/steps/project/issues/issues.rb13
-rw-r--r--features/steps/project/merge_requests.rb13
4 files changed, 41 insertions, 0 deletions
diff --git a/features/project/issues/issues.feature b/features/project/issues/issues.feature
index 283979204db..b9031f6f32b 100644
--- a/features/project/issues/issues.feature
+++ b/features/project/issues/issues.feature
@@ -202,3 +202,11 @@ Feature: Project Issues
And I click link "Edit" for the issue
And I preview a description text like "Bug fixed :smile:"
Then I should see the Markdown write tab
+
+ @javascript
+ Scenario: I can unsubscribe from issue
+ Given project "Shop" has "Tasks-open" open issue with task markdown
+ When I visit issue page "Tasks-open"
+ Then I should see that I am subscribed
+ When I click button "Unsubscribe"
+ Then I should see that I am unsubscribed
diff --git a/features/project/merge_requests.feature b/features/project/merge_requests.feature
index adad100e56c..91dc576f8b4 100644
--- a/features/project/merge_requests.feature
+++ b/features/project/merge_requests.feature
@@ -225,3 +225,10 @@ Feature: Project Merge Requests
When I fill in merge request search with "Fe"
Then I should see "Feature NS-03" in merge requests
And I should not see "Bug NS-04" in merge requests
+
+ @javascript
+ Scenario: I can unsubscribe from merge request
+ Given I visit merge request page "Bug NS-04"
+ Then I should see that I am subscribed
+ When I click button "Unsubscribe"
+ Then I should see that I am unsubscribed
diff --git a/features/steps/project/issues/issues.rb b/features/steps/project/issues/issues.rb
index 6d72c93ad13..e8ca3f7c176 100644
--- a/features/steps/project/issues/issues.rb
+++ b/features/steps/project/issues/issues.rb
@@ -18,10 +18,23 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
page.should_not have_content "Tweet control"
end
+ step 'I should see that I am subscribed' do
+ find(".subscribe-button span").text.should == "Unsubscribe"
+ end
+
+ step 'I should see that I am unsubscribed' do
+ sleep 0.2
+ find(".subscribe-button span").text.should == "Subscribe"
+ end
+
step 'I click link "Closed"' do
click_link "Closed"
end
+ step 'I click button "Unsubscribe"' do
+ click_on "Unsubscribe"
+ end
+
step 'I should see "Release 0.3" in issues' do
page.should have_content "Release 0.3"
end
diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb
index b67b2e58caf..6e2f60972b6 100644
--- a/features/steps/project/merge_requests.rb
+++ b/features/steps/project/merge_requests.rb
@@ -56,6 +56,19 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
page.should_not have_content "Bug NS-04"
end
+ step 'I should see that I am subscribed' do
+ find(".subscribe-button span").text.should == "Unsubscribe"
+ end
+
+ step 'I should see that I am unsubscribed' do
+ sleep 0.2
+ find(".subscribe-button span").text.should == "Subscribe"
+ end
+
+ step 'I click button "Unsubscribe"' do
+ click_on "Unsubscribe"
+ end
+
step 'I click link "Close"' do
first(:css, '.close-mr-link').click
end