summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorValery Sizov <vsv2711@gmail.com>2015-03-16 17:20:17 +0200
committerValery Sizov <vsv2711@gmail.com>2015-03-16 21:38:41 +0200
commit1b437ec3498bc544dbd1b252f5c755e9073407fd (patch)
treee3c0cea66260a2b65d21b660ebd4b042a6b0c80c /features
parentf53683e67fa0db7b13d0dee977bc21206af7e0fd (diff)
downloadgitlab-ce-1b437ec3498bc544dbd1b252f5c755e9073407fd.tar.gz
tests
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..cc0d6033a2b 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(".sub_status").text.should == "subscribed"
+ end
+
+ step 'I should see that I am unsubscribed' do
+ sleep 0.2
+ find(".sub_status").text.should == "unsubscribed"
+ 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..5a35d703765 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(".sub_status").text.should == "subscribed"
+ end
+
+ step 'I should see that I am unsubscribed' do
+ sleep 0.2
+ find(".sub_status").text.should == "unsubscribed"
+ end
+
+ step 'I click button "Unsubscribe"' do
+ click_on "Unsubscribe"
+ end
+
step 'I click link "Close"' do
first(:css, '.close-mr-link').click
end