summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-09-11 14:31:19 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-09-11 14:31:19 +0300
commit5913f74446cd529cef4899aeaa60f273a1aa418b (patch)
tree42601f5337b9dd656b3cf1cdb9456a041e99b705
parent350f5574793f9a2c262541f3b873a9b39dd171ad (diff)
downloadgitlab-ce-5913f74446cd529cef4899aeaa60f273a1aa418b.tar.gz
Clickable labels feature test
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r--features/project/issues/issues.feature7
-rw-r--r--features/project/issues/labels.feature1
-rw-r--r--features/steps/project/issues.rb12
3 files changed, 19 insertions, 1 deletions
diff --git a/features/project/issues/issues.feature b/features/project/issues/issues.feature
index e3001318c23..ae6a03ce865 100644
--- a/features/project/issues/issues.feature
+++ b/features/project/issues/issues.feature
@@ -119,3 +119,10 @@ Feature: Project Issues
Given I click link "New Issue"
And I submit new issue "500 error on profile"
Then I should see issue "500 error on profile"
+
+ Scenario: Clickable labels
+ Given issue 'Release 0.4' has label 'bug'
+ And I visit project "Shop" issues page
+ When I click label 'bug'
+ And I should see "Release 0.4" in issues
+ And I should not see "Tweet control" in issues
diff --git a/features/project/issues/labels.feature b/features/project/issues/labels.feature
index 77ee5d8a686..bdc1646ff12 100644
--- a/features/project/issues/labels.feature
+++ b/features/project/issues/labels.feature
@@ -45,4 +45,3 @@ Feature: Project Labels
And I visit project "Forum" new label page
When I submit new label 'bug'
Then I should see label 'bug'
-
diff --git a/features/steps/project/issues.rb b/features/steps/project/issues.rb
index 32a3a0d3f56..65c243a7297 100644
--- a/features/steps/project/issues.rb
+++ b/features/steps/project/issues.rb
@@ -218,6 +218,18 @@ class ProjectIssues < Spinach::FeatureSteps
page.should_not have_content 'Bugfix1'
end
+ step 'issue \'Release 0.4\' has label \'bug\'' do
+ label = project.labels.create!(name: 'bug', color: '#990000')
+ issue = Issue.find_by!(title: 'Release 0.4')
+ issue.labels << label
+ end
+
+ step 'I click label \'bug\'' do
+ within ".issues-list" do
+ click_link 'bug'
+ end
+ end
+
def filter_issue(text)
fill_in 'issue_search', with: text