OSDN Git Service

Preselected Milestone: Cucumber scenario added
authorAlex Denisov <1101.debian@gmail.com>
Fri, 7 Sep 2012 10:56:13 +0000 (13:56 +0300)
committerAlex Denisov <1101.debian@gmail.com>
Fri, 7 Sep 2012 10:56:13 +0000 (13:56 +0300)
features/projects/issues/issues.feature
features/step_definitions/project/project_issues_steps.rb

index 42a3d87..f0d9b61 100644 (file)
@@ -64,3 +64,13 @@ Feature: Issues
     And I fill in issue search with ""
     Then I should see "Release 0.4" in issues
     And I should see "Release 0.3" in issues
+
+  @javascript
+  @current
+  Scenario: I create Issue with pre-selected milestone
+    Given project "Shop" has milestone "v2.2"
+    And project "Shop" has milestone "v3.0"
+    And I visit project "Shop" issues page
+    When I select milestone "v3.0"
+    And I click link "New Issue"
+    Then I should see selected milestone with title "v3.0"
index e46c1f4..ecf0892 100644 (file)
@@ -55,3 +55,15 @@ Given /^I fill in issue search with "(.*?)"$/ do |arg1|
   end
   fill_in 'issue_search', with: arg1
 end
+
+When /^I select milestone "(.*?)"$/ do |milestone_title|
+  select milestone_title, from: "milestone_id"
+end
+
+Then /^I should see selected milestone with title "(.*?)"$/ do |milestone_title|
+  issues_milestone_selector = "#issue_milestone_id_chzn/a"
+  wait_until{
+    page.has_content?("Details") 
+  }
+  page.find(issues_milestone_selector).should have_content(milestone_title)
+end