diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-09-07 11:10:27 -0700 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-09-07 11:10:27 -0700 |
commit | 7b50a7c99dbab132bfc2fbabfc3309f13359fd60 (patch) | |
tree | aba61fdfef68241b9c9bac03d0c230d18976ca9c /features | |
parent | 367e17cc84bd432117f283d2e858a29d033e979f (diff) | |
parent | 1b83af6eed3a4069a8f66a6785632e6f950e900f (diff) | |
download | gitlab-ce-7b50a7c99dbab132bfc2fbabfc3309f13359fd60.tar.gz |
Merge pull request #1402 from AlexDenisov/preselected_milestone_while_create_new_issue
Preselected milestone and assignee while create new issue
Diffstat (limited to 'features')
-rw-r--r-- | features/projects/issues/issues.feature | 16 | ||||
-rw-r--r-- | features/step_definitions/project/project_issues_steps.rb | 24 |
2 files changed, 40 insertions, 0 deletions
diff --git a/features/projects/issues/issues.feature b/features/projects/issues/issues.feature index 42a3d8736e0..b2301b3f1ff 100644 --- a/features/projects/issues/issues.feature +++ b/features/projects/issues/issues.feature @@ -64,3 +64,19 @@ 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 + 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" + + @javascript + Scenario: I create Issue with pre-selected assignee + When I select first assignee from "Shop" project + And I click link "New Issue" + Then I should see first assignee from "Shop" as selected assignee + diff --git a/features/step_definitions/project/project_issues_steps.rb b/features/step_definitions/project/project_issues_steps.rb index e46c1f42f75..d78da53c4fc 100644 --- a/features/step_definitions/project/project_issues_steps.rb +++ b/features/step_definitions/project/project_issues_steps.rb @@ -55,3 +55,27 @@ 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 + +When /^I select first assignee from "(.*?)" project$/ do |project_name| + project = Project.find_by_name project_name + first_assignee = project.users.first + select first_assignee.name, from: "assignee_id" +end + +Then /^I should see first assignee from "(.*?)" as selected assignee$/ do |project_name| + issues_assignee_selector = "#issue_assignee_id_chzn/a" + wait_until{ page.has_content?("Details") } + project = Project.find_by_name project_name + assignee_name = project.users.first.name + page.find(issues_assignee_selector).should have_content(assignee_name) +end |