Commit c818c93a authored by Alex Denisov's avatar Alex Denisov

Cucumber scenario on pre-selected assignee added

parent 26552051
......@@ -66,7 +66,6 @@ Feature: 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"
......@@ -74,3 +73,11 @@ Feature: Issues
When I select milestone "v3.0"
And I click link "New Issue"
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
When /^I select milestone "(.*?)"$/ do |milestone_title|
#puts page.body
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")
}
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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment