Commit 09263719d536a3935c4b1d801472126ece28f283

Authored by Alex Denisov
1 parent 137594dd

Preselected Milestone: Cucumber scenario added

features/projects/issues/issues.feature
@@ -64,3 +64,13 @@ Feature: Issues @@ -64,3 +64,13 @@ Feature: Issues
64 And I fill in issue search with "" 64 And I fill in issue search with ""
65 Then I should see "Release 0.4" in issues 65 Then I should see "Release 0.4" in issues
66 And I should see "Release 0.3" in issues 66 And I should see "Release 0.3" in issues
  67 +
  68 + @javascript
  69 + @current
  70 + Scenario: I create Issue with pre-selected milestone
  71 + Given project "Shop" has milestone "v2.2"
  72 + And project "Shop" has milestone "v3.0"
  73 + And I visit project "Shop" issues page
  74 + When I select milestone "v3.0"
  75 + And I click link "New Issue"
  76 + Then I should see selected milestone with title "v3.0"
features/step_definitions/project/project_issues_steps.rb
@@ -55,3 +55,15 @@ Given /^I fill in issue search with "(.*?)"$/ do |arg1| @@ -55,3 +55,15 @@ Given /^I fill in issue search with "(.*?)"$/ do |arg1|
55 end 55 end
56 fill_in 'issue_search', with: arg1 56 fill_in 'issue_search', with: arg1
57 end 57 end
  58 +
  59 +When /^I select milestone "(.*?)"$/ do |milestone_title|
  60 + select milestone_title, from: "milestone_id"
  61 +end
  62 +
  63 +Then /^I should see selected milestone with title "(.*?)"$/ do |milestone_title|
  64 + issues_milestone_selector = "#issue_milestone_id_chzn/a"
  65 + wait_until{
  66 + page.has_content?("Details")
  67 + }
  68 + page.find(issues_milestone_selector).should have_content(milestone_title)
  69 +end