Commit c818c93aa7f8102dfd449bf2f1e82b36578e3ac7
1 parent
26552051
Exists in
master
and in
4 other branches
Cucumber scenario on pre-selected assignee added
Showing
2 changed files
with
23 additions
and
5 deletions
Show diff stats
features/projects/issues/issues.feature
| ... | ... | @@ -66,7 +66,6 @@ Feature: Issues |
| 66 | 66 | And I should see "Release 0.3" in issues |
| 67 | 67 | |
| 68 | 68 | @javascript |
| 69 | - @current | |
| 70 | 69 | Scenario: I create Issue with pre-selected milestone |
| 71 | 70 | Given project "Shop" has milestone "v2.2" |
| 72 | 71 | And project "Shop" has milestone "v3.0" |
| ... | ... | @@ -74,3 +73,11 @@ Feature: Issues |
| 74 | 73 | When I select milestone "v3.0" |
| 75 | 74 | And I click link "New Issue" |
| 76 | 75 | Then I should see selected milestone with title "v3.0" |
| 76 | + | |
| 77 | + @javascript | |
| 78 | + @current | |
| 79 | + Scenario: I create Issue with pre-selected assignee | |
| 80 | + When I select first assignee from "Shop" project | |
| 81 | + And I click link "New Issue" | |
| 82 | + Then I should see first assignee from "Shop" as selected assignee | |
| 83 | + | ... | ... |
features/step_definitions/project/project_issues_steps.rb
| ... | ... | @@ -57,14 +57,25 @@ Given /^I fill in issue search with "(.*?)"$/ do |arg1| |
| 57 | 57 | end |
| 58 | 58 | |
| 59 | 59 | When /^I select milestone "(.*?)"$/ do |milestone_title| |
| 60 | - #puts page.body | |
| 61 | 60 | select milestone_title, from: "milestone_id" |
| 62 | 61 | end |
| 63 | 62 | |
| 64 | 63 | Then /^I should see selected milestone with title "(.*?)"$/ do |milestone_title| |
| 65 | 64 | issues_milestone_selector = "#issue_milestone_id_chzn/a" |
| 66 | - wait_until{ | |
| 67 | - page.has_content?("Details") | |
| 68 | - } | |
| 65 | + wait_until{ page.has_content?("Details") } | |
| 69 | 66 | page.find(issues_milestone_selector).should have_content(milestone_title) |
| 70 | 67 | end |
| 68 | + | |
| 69 | +When /^I select first assignee from "(.*?)" project$/ do |project_name| | |
| 70 | + project = Project.find_by_name project_name | |
| 71 | + first_assignee = project.users.first | |
| 72 | + select first_assignee.name, from: "assignee_id" | |
| 73 | +end | |
| 74 | + | |
| 75 | +Then /^I should see first assignee from "(.*?)" as selected assignee$/ do |project_name| | |
| 76 | + issues_assignee_selector = "#issue_assignee_id_chzn/a" | |
| 77 | + wait_until{ page.has_content?("Details") } | |
| 78 | + project = Project.find_by_name project_name | |
| 79 | + assignee_name = project.users.first.name | |
| 80 | + page.find(issues_assignee_selector).should have_content(assignee_name) | |
| 81 | +end | ... | ... |