mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-11 09:54:21 +01:00
add validation to catch empty descriptions
This commit is contained in:
parent
6e5057138d
commit
abf4524679
6 changed files with 56 additions and 5 deletions
|
|
@ -76,6 +76,25 @@ When /^I submit multiple actions with using$/ do |multiple_actions|
|
|||
selenium.click("xpath=//form[@id='todo-form-multi-new-action']//button[@id='todo_multi_new_action_submit']", :wait_for => :ajax, :javascript_framework => :jquery)
|
||||
end
|
||||
|
||||
When /^I fill the multiple actions form with "([^"]*)", "([^"]*)", "([^"]*)", "([^"]*)"$/ do |descriptions, project_name, context_name, tags|
|
||||
fill_in "todo[multiple_todos]", :with => descriptions
|
||||
fill_in "multi_todo_project_name", :with => project_name
|
||||
fill_in "multi_todo_context_name", :with => context_name
|
||||
fill_in "multi_tag_list", :with => tags
|
||||
end
|
||||
|
||||
When /^I submit the new multiple actions form with "([^"]*)", "([^"]*)", "([^"]*)", "([^"]*)"$/ do |descriptions, project_name, context_name, tags|
|
||||
When "I fill the multiple actions form with \"#{descriptions}\", \"#{project_name}\", \"#{context_name}\", \"#{tags}\""
|
||||
selenium.click("xpath=//form[@id='todo-form-multi-new-action']//button[@id='todo_multi_new_action_submit']", :wait_for => :ajax, :javascript_framework => :jquery)
|
||||
end
|
||||
|
||||
When /^I submit the new multiple actions form with$/ do |multi_line_descriptions|
|
||||
fill_in "todo[multiple_todos]", :with => multi_line_descriptions
|
||||
selenium.click("xpath=//form[@id='todo-form-multi-new-action']//button[@id='todo_multi_new_action_submit']", :wait_for => :ajax, :javascript_framework => :jquery)
|
||||
end
|
||||
|
||||
|
||||
|
||||
Then /^the dependencies of "(.*)" should include "(.*)"$/ do |child_name, parent_name|
|
||||
parent = @current_user.todos.find_by_description(parent_name)
|
||||
parent.should_not be_nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue