mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-05 16:58:50 +01:00
get some further scenarios for adding todos to several pages
one is still failing, will get to that
This commit is contained in:
parent
ab2e51a51a
commit
8cbe077784
8 changed files with 118 additions and 32 deletions
|
|
@ -90,24 +90,54 @@ end
|
|||
When /^I submit a new action with description "([^"]*)"$/ do |description|
|
||||
fill_in "todo[description]", :with => description
|
||||
submit_next_action_form
|
||||
selenium.wait_for :wait_for => :ajax, :javascript_framework => :jquery
|
||||
end
|
||||
|
||||
When /^I submit a new action with description "([^"]*)" and the tags "([^"]*)" in the context "([^"]*)"$/ do |description, tags, context_name|
|
||||
fill_in "todo[description]", :with => description
|
||||
fill_in "tag_list", :with => tags
|
||||
|
||||
js="$('#todo_context_name').val('');"
|
||||
selenium.get_eval "(function() {with(this) {#{js}}}).call(selenium.browserbot.getCurrentWindow());"
|
||||
# fill_in does not seem to work when the field is prefilled with something. Empty the field first
|
||||
clear_context_name_from_next_action_form
|
||||
fill_in "todo_context_name", :with => context_name
|
||||
submit_next_action_form
|
||||
selenium.wait_for :wait_for => :ajax, :javascript_framework => :jquery
|
||||
end
|
||||
|
||||
When /^I submit a new deferred action with description "([^"]*)" and the tags "([^"]*)" in the context "([^"]*)"$/ do |description, tags, context_name|
|
||||
fill_in "todo[description]", :with => description
|
||||
|
||||
clear_context_name_from_next_action_form
|
||||
fill_in "context_name", :with => context_name
|
||||
|
||||
fill_in "tag_list", :with => tags
|
||||
fill_in "todo[show_from]", :with => format_date(@current_user.time + 1.week)
|
||||
submit_next_action_form
|
||||
selenium.wait_for :wait_for => :ajax, :javascript_framework => :jquery
|
||||
end
|
||||
|
||||
When /^I submit a new action with description "([^"]*)" to project "([^"]*)" with tags "([^"]*)" in the context "([^"]*)"$/ do |description, project_name, tags, context_name|
|
||||
fill_in "todo[description]", :with => description
|
||||
|
||||
clear_project_name_from_next_action_form
|
||||
clear_context_name_from_next_action_form
|
||||
|
||||
fill_in "todo_project_name", :with => project_name
|
||||
fill_in "context_name", :with => context_name
|
||||
fill_in "tag_list", :with => tags
|
||||
|
||||
submit_next_action_form
|
||||
selenium.wait_for :wait_for => :ajax, :javascript_framework => :jquery
|
||||
end
|
||||
|
||||
When /^I submit a new action with description "([^"]*)" in the context "([^"]*)"$/ do |description, context_name|
|
||||
fill_in "todo[description]", :with => description
|
||||
|
||||
clear_context_name_from_next_action_form
|
||||
fill_in "context_name", :with => context_name
|
||||
|
||||
submit_next_action_form
|
||||
selenium.wait_for :wait_for => :ajax, :javascript_framework => :jquery
|
||||
end
|
||||
|
||||
When /^I submit multiple actions with using$/ do |multiple_actions|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue