mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-23 01:06:11 +01:00
make adding of todos from sidebar work in context and project grouping
This commit is contained in:
parent
783d4dd774
commit
9c0445fcb7
17 changed files with 528 additions and 389 deletions
|
|
@ -203,6 +203,23 @@ When /^I submit a new action with description "([^"]*)"$/ do |description|
|
|||
submit_next_action_form
|
||||
end
|
||||
|
||||
When /^I submit a new action with description "([^"]*)" in the project "(.*?)"$/ do |description, project_name|
|
||||
within "form#todo-form-new-action" do
|
||||
fill_in "todo[description]", :with => description
|
||||
fill_in "project_name", :with => project_name
|
||||
end
|
||||
submit_next_action_form
|
||||
end
|
||||
|
||||
When(/^I submit a new action with description "([^"]*)" to project "([^"]*)" with tags "([^"]*)"$/) do |description, project_name, tags|
|
||||
within "form#todo-form-new-action" do
|
||||
fill_in "todo[description]", :with => description
|
||||
fill_in "project_name", :with => project_name
|
||||
fill_in "tag_list", :with => tags
|
||||
end
|
||||
submit_next_action_form
|
||||
end
|
||||
|
||||
When /^I submit a new action with description "([^"]*)" with a dependency on "([^"]*)"$/ do |todo_description, predecessor_description|
|
||||
predecessor = @current_user.todos.where(:description => predecessor_description).first
|
||||
predecessor.should_not be_nil
|
||||
|
|
@ -287,6 +304,16 @@ When /^I submit a new deferred action with description "([^"]*)" and the tags "(
|
|||
submit_next_action_form
|
||||
end
|
||||
|
||||
When(/^I submit a new deferred action with description "([^"]*)" to project "(.*?)" with tags "([^"]*)"$/) do |description, project_name, tags|
|
||||
within "form#todo-form-new-action" do
|
||||
fill_in "todo[description]", :with => description
|
||||
fill_in "todo_project_name", :with => project_name
|
||||
fill_in "tag_list", :with => tags
|
||||
fill_in "todo[show_from]", :with => format_date(@current_user.time + 1.week)
|
||||
end
|
||||
submit_next_action_form
|
||||
end
|
||||
|
||||
When /^I submit a new deferred action with description "([^"]*)" to project "([^"]*)" with tags "([^"]*)" in the context "([^"]*)"$/ do |description, project_name, tags, context_name|
|
||||
fill_in "todo[description]", :with => description
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue