Commit 833bc305 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Add test for createing issue with labels

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 0f474887
...@@ -30,6 +30,13 @@ Feature: Project Issues ...@@ -30,6 +30,13 @@ Feature: Project Issues
And I submit new issue "500 error on profile" And I submit new issue "500 error on profile"
Then I should see 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 @javascript
Scenario: I comment issue Scenario: I comment issue
Given I visit issue page "Release 0.4" Given I visit issue page "Release 0.4"
......
...@@ -50,10 +50,22 @@ class ProjectIssues < Spinach::FeatureSteps ...@@ -50,10 +50,22 @@ class ProjectIssues < Spinach::FeatureSteps
click_button "Submit new issue" click_button "Submit new issue"
end 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 Given 'I click link "500 error on profile"' do
click_link "500 error on profile" click_link "500 error on profile"
end 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 Then 'I should see issue "500 error on profile"' do
issue = Issue.find_by(title: "500 error on profile") issue = Issue.find_by(title: "500 error on profile")
page.should have_content issue.title page.should have_content issue.title
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment