OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/features/step_definitions/_when_steps.rb

20 lines
598 B

When /^I fill in the ID of "([^"]*)" with (\d+) hash for "([^"]*)"$/ do |issue_name, number_hash_keys, container|
issue = Issue.find_by_subject(issue_name)
text = "#{('#' * number_hash_keys.to_i)}#{issue.id}"
step %Q{I fill in "#{text}" for "#{container}"}
end
When /^I follow the issue link with (\d+) hash for "([^"]*)"$/ do |hash_count, issue_name|
issue = Issue.find_by_subject(issue_name)
text = ""
if hash_count.to_i > 1
text = "##{issue.id} #{issue.status}: #{issue.subject}"
elsif hash_count.to_i == 1
text = "##{issue.id}"
end
step %Q{I follow "#{text}"}
end