diff --git a/features/project/issues/issues.feature b/features/project/issues/issues.feature index 191e8dcbe7fd7259e683378a5c5a0cb42d8a16c5..b2e6f1f9324ec0d87a6ecd4b0477251e8576a61e 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 d0b4aa6e080090397e4a132689bcb93d2a6d682c..557ea2fdca8cf006e6c7d7e232472029956c3d77 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