Introduce selenium tests to help get the ajax interactions correct and maintainable.

Start to improve the ajax interactions around the new deferred actions section on the project detail page
Add a README for developers describing how to run the selenium tests.


git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@387 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
lukemelia 2007-01-02 00:19:57 +00:00
parent 71df0f1061
commit bde8a0bde0
170 changed files with 35512 additions and 25 deletions

View file

@ -0,0 +1,5 @@
open :controller => 'login', :action => 'logout'
open :controller => 'login'
type "user_login", username
type "user_password", password
click_and_wait "login"

View file

@ -0,0 +1,8 @@
setup :fixtures => :all
include_partial 'login', :username => 'admin', :password => 'abracadabra'
open "/project/Build_a_working_time_machine"
type "todo_description", "choose era"
type "todo_show_from", "1/1/2030"
click "//input[@value='Add item']"
wait_for_element_present "xpath=//div[@id='tickler'] //div[@class='item-container']"
assert_not_visible "tickler-empty-nd"

View file

@ -0,0 +1,9 @@
setup :fixtures => :all
include_partial 'login', :username => 'admin', :password => 'abracadabra'
open "/project/Build_a_working_time_machine"
click "edit_icon_todo_5"
wait_for_element_present "show_from_todo_5"
type "show_from_todo_5", "1/1/2030"
click "//input[@value='Update']"
wait_for_element_present "xpath=//div[@id='tickler'] //div[@id='todo_5']"
assert_not_visible "tickler-empty-nd"

View file

@ -0,0 +1,8 @@
open :controller => 'login', :action => 'logout'
open :controller => 'login'
assert_title 'exact:TRACKS::Login'
type "user_login", "admin"
type "user_password", "incorrect_password"
click_and_wait "login"
assert_title 'exact:TRACKS::Login'
verify_text_present 'Login unsuccessful'

View file

@ -0,0 +1,8 @@
open :controller => 'login', :action => 'logout'
open :controller => 'login'
assert_title 'exact:TRACKS::Login'
type "user_login", "admin"
type "user_password", "abracadabra"
click_and_wait "login"
assert_title 'exact:TRACKS::List tasks'

View file

@ -0,0 +1,10 @@
setup :fixtures => :all
include_partial 'login', :username => 'admin', :password => 'abracadabra'
open "/project/Build_a_working_time_machine"
type "todo_description", "choose era"
type "todo_show_from", "1/1/2030"
click "//input[@value='Add item']"
wait_for_element_present "xpath=//div[@id='tickler'] //div[@class='item-container']"
open "/project/Build_a_working_time_machine"
click "xpath=//div[@id='tickler'] //input[@class='item-checkbox']"
wait_for_visible "tickler-empty-nd"

View file

@ -0,0 +1,4 @@
setup :fixtures => :all
include_partial 'login', :username => 'admin', :password => 'abracadabra'
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']"

View file

@ -0,0 +1,5 @@
setup :fixtures => :all
include_partial 'login', :username => 'admin', :password => 'abracadabra'
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_not_visible 'c5'

View file

@ -0,0 +1,5 @@
setup :fixtures => :all
include_partial 'login', :username => 'admin', :password => 'abracadabra'
click "xpath=//div[@id='completed'] //div[@id='todo_3'] //input[@class='item-checkbox']"
wait_for_element_present "xpath=//div[@id='c4'] //div[@id='todo_3']"
assert_not_visible "c4empty-nd"