Cucumber scenario on pre-selected assignee added
This commit is contained in:
parent
26552051b7
commit
c818c93aa7
2 changed files with 23 additions and 5 deletions
|
@ -66,7 +66,6 @@ Feature: Issues
|
||||||
And I should see "Release 0.3" in issues
|
And I should see "Release 0.3" in issues
|
||||||
|
|
||||||
@javascript
|
@javascript
|
||||||
@current
|
|
||||||
Scenario: I create Issue with pre-selected milestone
|
Scenario: I create Issue with pre-selected milestone
|
||||||
Given project "Shop" has milestone "v2.2"
|
Given project "Shop" has milestone "v2.2"
|
||||||
And project "Shop" has milestone "v3.0"
|
And project "Shop" has milestone "v3.0"
|
||||||
|
@ -74,3 +73,11 @@ Feature: Issues
|
||||||
When I select milestone "v3.0"
|
When I select milestone "v3.0"
|
||||||
And I click link "New Issue"
|
And I click link "New Issue"
|
||||||
Then I should see selected milestone with title "v3.0"
|
Then I should see selected milestone with title "v3.0"
|
||||||
|
|
||||||
|
@javascript
|
||||||
|
@current
|
||||||
|
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
|
||||||
|
|
||||||
|
|
|
@ -57,14 +57,25 @@ Given /^I fill in issue search with "(.*?)"$/ do |arg1|
|
||||||
end
|
end
|
||||||
|
|
||||||
When /^I select milestone "(.*?)"$/ do |milestone_title|
|
When /^I select milestone "(.*?)"$/ do |milestone_title|
|
||||||
#puts page.body
|
|
||||||
select milestone_title, from: "milestone_id"
|
select milestone_title, from: "milestone_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
Then /^I should see selected milestone with title "(.*?)"$/ do |milestone_title|
|
Then /^I should see selected milestone with title "(.*?)"$/ do |milestone_title|
|
||||||
issues_milestone_selector = "#issue_milestone_id_chzn/a"
|
issues_milestone_selector = "#issue_milestone_id_chzn/a"
|
||||||
wait_until{
|
wait_until{ page.has_content?("Details") }
|
||||||
page.has_content?("Details")
|
|
||||||
}
|
|
||||||
page.find(issues_milestone_selector).should have_content(milestone_title)
|
page.find(issues_milestone_selector).should have_content(milestone_title)
|
||||||
end
|
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
|
||||||
|
|
Loading…
Reference in a new issue