Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-09-07 22:10:27 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-09-07 22:10:27 +0400
commit7b50a7c99dbab132bfc2fbabfc3309f13359fd60 (patch)
treeaba61fdfef68241b9c9bac03d0c230d18976ca9c /features
parent367e17cc84bd432117f283d2e858a29d033e979f (diff)
parent1b83af6eed3a4069a8f66a6785632e6f950e900f (diff)
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.feature16
-rw-r--r--features/step_definitions/project/project_issues_steps.rb24
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