mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-19 16:50:12 +01:00
Updated Selenium test suite so that *all tests pass*. Found and fixed one bug in routes that a Selenium test caught.
This commit is contained in:
parent
397029dfc1
commit
c6b159b97e
9 changed files with 10 additions and 10 deletions
|
|
@ -43,7 +43,7 @@ ActionController::Routing::Routes.draw do |map|
|
||||||
# so /todos/tag/version1.5.xml will result in :name => 'version1.5.xml'
|
# so /todos/tag/version1.5.xml will result in :name => 'version1.5.xml'
|
||||||
# UPDATE: added support for mobile view. All tags ending on .m will be
|
# UPDATE: added support for mobile view. All tags ending on .m will be
|
||||||
# routed to mobile view of tags.
|
# routed to mobile view of tags.
|
||||||
todos.tag 'todos/tag/:name', :action => "tag", :format => 'm', :name => /.*\.m/
|
todos.tag 'todos/tag/:name.m', :action => "tag", :format => 'm'
|
||||||
todos.tag 'todos/tag/:name', :action => "tag", :name => /.*/
|
todos.tag 'todos/tag/:name', :action => "tag", :name => /.*/
|
||||||
|
|
||||||
todos.mobile 'mobile', :action => "index", :format => 'm'
|
todos.mobile 'mobile', :action => "index", :format => 'm'
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ assert_element_present "todo_9"
|
||||||
|
|
||||||
# add new action to existing context
|
# add new action to existing context
|
||||||
type "todo_description", "a new action"
|
type "todo_description", "a new action"
|
||||||
type "todo_context_name", "Agenda"
|
type "todo_context_name", "agenda"
|
||||||
click "css=#todo-form-new-action .submit_box button"
|
click "css=#todo-form-new-action .submit_box button"
|
||||||
wait_for_visible "flash"
|
wait_for_visible "flash"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,4 +2,4 @@ setup :fixtures => :all
|
||||||
login :as => 'admin'
|
login :as => 'admin'
|
||||||
open '/'
|
open '/'
|
||||||
click "xpath=//div[@id='c1'] //div[@id='todo_9'] //input[@class='item-checkbox']"
|
click "xpath=//div[@id='c1'] //div[@id='todo_9'] //input[@class='item-checkbox']"
|
||||||
wait_for_element_present "xpath=//div[@id='completed'] //div[@id='todo_9']"
|
wait_for_element_present "xpath=//div[@id='completed_container'] //div[@id='todo_9']"
|
||||||
|
|
|
||||||
|
|
@ -2,5 +2,5 @@ setup :fixtures => :all
|
||||||
login :as => 'admin'
|
login :as => 'admin'
|
||||||
open '/'
|
open '/'
|
||||||
click "xpath=//div[@id='c5'] //div[@id='todo_5'] //input[@class='item-checkbox']"
|
click "xpath=//div[@id='c5'] //div[@id='todo_5'] //input[@class='item-checkbox']"
|
||||||
wait_for_element_present "xpath=//div[@id='completed'] //div[@id='todo_5']"
|
wait_for_element_present "xpath=//div[@id='completed_container'] //div[@id='todo_5']"
|
||||||
wait_for_not_visible 'c5'
|
wait_for_not_visible 'c5'
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
setup :fixtures => :all
|
setup :fixtures => :all
|
||||||
login :as => 'admin'
|
login :as => 'admin'
|
||||||
open '/'
|
open '/'
|
||||||
click "xpath=//div[@id='completed'] //div[@id='todo_3'] //input[@class='item-checkbox']"
|
click "xpath=//div[@id='completed_container'] //div[@id='todo_3'] //input[@class='item-checkbox']"
|
||||||
wait_for_element_present "xpath=//div[@id='c4'] //div[@id='todo_3']"
|
wait_for_element_present "xpath=//div[@id='c4'] //div[@id='todo_3']"
|
||||||
assert_not_visible "c4empty-nd"
|
assert_not_visible "c4empty-nd"
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ login :as => 'admin'
|
||||||
open '/m'
|
open '/m'
|
||||||
wait_for_text 'css=h1 span.count', '10'
|
wait_for_text 'css=h1 span.count', '10'
|
||||||
|
|
||||||
click_and_wait "link=Add new action"
|
click_and_wait "link=0-Add new action"
|
||||||
|
|
||||||
type "todo_notes", "test notes"
|
type "todo_notes", "test notes"
|
||||||
type "todo_description", "test name"
|
type "todo_description", "test name"
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ wait_for_title "All actions"
|
||||||
wait_for_text 'css=h1 span.count', '10'
|
wait_for_text 'css=h1 span.count', '10'
|
||||||
|
|
||||||
# open context page
|
# open context page
|
||||||
click_and_wait "link=Contexts"
|
click_and_wait "link=2-Contexts"
|
||||||
# verify_title "All actions in context agenda"
|
# verify_title "All actions in context agenda"
|
||||||
# choose agenda context
|
# choose agenda context
|
||||||
click_and_wait "link=agenda"
|
click_and_wait "link=agenda"
|
||||||
|
|
@ -18,7 +18,7 @@ click_and_wait "link=foo"
|
||||||
verify_title "TRACKS::Tagged with 'foo'"
|
verify_title "TRACKS::Tagged with 'foo'"
|
||||||
wait_for_text 'css=h1 span.count', '2'
|
wait_for_text 'css=h1 span.count', '2'
|
||||||
|
|
||||||
click_and_wait "link=Projects"
|
click_and_wait "link=3-Projects"
|
||||||
wait_for_text 'css=h1 span.count', '3'
|
wait_for_text 'css=h1 span.count', '3'
|
||||||
click_and_wait "link=Build a working time machine"
|
click_and_wait "link=Build a working time machine"
|
||||||
wait_for_text 'css=h1 span.count', '3'
|
wait_for_text 'css=h1 span.count', '3'
|
||||||
|
|
|
||||||
|
|
@ -3,5 +3,5 @@ login :as => 'admin'
|
||||||
open "/projects/1"
|
open "/projects/1"
|
||||||
include_partial 'project_detail/add_deferred_todo'
|
include_partial 'project_detail/add_deferred_todo'
|
||||||
click "xpath=//div[@id='tickler'] //div[@id='todo_15'] //input[@class='item-checkbox']"
|
click "xpath=//div[@id='tickler'] //div[@id='todo_15'] //input[@class='item-checkbox']"
|
||||||
wait_for_element_present "xpath=//div[@id='completed'] //div[@id='todo_15']"
|
wait_for_element_present "xpath=//div[@id='completed_container'] //div[@id='todo_15']"
|
||||||
assert_not_visible "tickler-empty-nd"
|
assert_not_visible "tickler-empty-nd"
|
||||||
|
|
@ -11,6 +11,6 @@ assert_text 'badge_count', '1'
|
||||||
|
|
||||||
# mark one complete
|
# mark one complete
|
||||||
click "xpath=//div[@id='c1'] //div[@id='todo_1'] //input[@class='item-checkbox']"
|
click "xpath=//div[@id='c1'] //div[@id='todo_1'] //input[@class='item-checkbox']"
|
||||||
wait_for_element_present "xpath=//div[@id='completed'] //div[@id='todo_1']"
|
wait_for_element_present "xpath=//div[@id='completed_container'] //div[@id='todo_1']"
|
||||||
|
|
||||||
assert_text 'badge_count', '0'
|
assert_text 'badge_count', '0'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue