mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-23 15:44:09 +01:00
fix #922. You can now mark a todo complete from the tickler. Also fixed some small aasm corner cases found by this change
This commit is contained in:
parent
367907eab2
commit
07b05d01f7
16 changed files with 276 additions and 147 deletions
|
|
@ -6,17 +6,7 @@ When /^I mark "([^"]*)" as complete$/ do |action_description|
|
|||
|
||||
check "mark_complete_#{todo.id}"
|
||||
|
||||
todo_container = "fail" # fail this test if @source_view is wrong
|
||||
todo_container = "p#{todo.project_id}items" if @source_view=="project"
|
||||
todo_container = "c#{todo.context_id}items" if @source_view=="context" || @source_view=="todos" || @source_view=="tag"
|
||||
todo_container = "tickler_container" if @source_view=="stats"
|
||||
|
||||
# container should be there
|
||||
selenium.is_element_present("//div[@id='#{todo_container}']").should be_true
|
||||
|
||||
wait_for :timeout => 5 do
|
||||
!selenium.is_element_present("//div[@id='#{todo_container}']//div[@id='line_todo_#{todo.id}']")
|
||||
end
|
||||
wait_for_ajax
|
||||
end
|
||||
|
||||
When /^I mark "([^"]*)" as uncompleted$/ do |action_description|
|
||||
|
|
@ -25,19 +15,7 @@ When /^I mark "([^"]*)" as uncompleted$/ do |action_description|
|
|||
|
||||
check "mark_complete_#{todo.id}"
|
||||
|
||||
todo_container = "fail" # fail this test if @source_view is wrong
|
||||
todo_container = "p#{todo.project_id}items" if @source_view=="project"
|
||||
todo_container = "c#{todo.context_id}items" if @source_view=="context" || @source_view=="todos" || @source_view=="tag"
|
||||
|
||||
todo_container.should_not == "fail" unless @source_view=="done"
|
||||
|
||||
unless @source_view=="done"
|
||||
wait_for :timeout => 5 do
|
||||
selenium.is_element_present("//div[@id='#{todo_container}']//div[@id='line_todo_#{todo.id}']")
|
||||
end
|
||||
else
|
||||
wait_for_ajax
|
||||
end
|
||||
wait_for_ajax
|
||||
end
|
||||
|
||||
When /^I mark the complete todo "([^"]*)" active$/ do |action_description|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue