summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
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