summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-07-31 14:14:27 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-07-31 14:14:27 +0300
commit833bc305933bbf7b8b06d5464ae5716ccbe82674 (patch)
tree60507e1a30dfb9a08def5a3becf0f710149483ac /features
parent0f4748873d927a6650c4056ae846151c33de8936 (diff)
downloadgitlab-ce-833bc305933bbf7b8b06d5464ae5716ccbe82674.tar.gz
Add test for createing issue with labels
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'features')
-rw-r--r--features/project/issues/issues.feature7
-rw-r--r--features/steps/project/issues.rb12
2 files changed, 19 insertions, 0 deletions
diff --git a/features/project/issues/issues.feature b/features/project/issues/issues.feature
index 191e8dcbe7f..b2e6f1f9324 100644
--- a/features/project/issues/issues.feature
+++ b/features/project/issues/issues.feature
@@ -30,6 +30,13 @@ Feature: Project Issues
And I submit new issue "500 error on profile"
Then I should see issue "500 error on profile"
+ Scenario: I submit new unassigned issue with labels
+ Given project "Shop" has labels: "bug", "feature", "enhancement"
+ And I click link "New Issue"
+ And I submit new issue "500 error on profile" with label 'bug'
+ Then I should see issue "500 error on profile"
+ And I should see label 'bug' with issue
+
@javascript
Scenario: I comment issue
Given I visit issue page "Release 0.4"
diff --git a/features/steps/project/issues.rb b/features/steps/project/issues.rb
index d0b4aa6e080..557ea2fdca8 100644
--- a/features/steps/project/issues.rb
+++ b/features/steps/project/issues.rb
@@ -50,10 +50,22 @@ class ProjectIssues < Spinach::FeatureSteps
click_button "Submit new issue"
end
+ step 'I submit new issue "500 error on profile" with label \'bug\'' do
+ fill_in "issue_title", with: "500 error on profile"
+ select 'bug', from: "Labels"
+ click_button "Submit new issue"
+ end
+
Given 'I click link "500 error on profile"' do
click_link "500 error on profile"
end
+ step 'I should see label \'bug\' with issue' do
+ within '.issue-show-labels' do
+ page.should have_content 'bug'
+ end
+ end
+
Then 'I should see issue "500 error on profile"' do
issue = Issue.find_by(title: "500 error on profile")
page.should have_content issue.title