mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-16 04:08:08 +01:00
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:
parent
71df0f1061
commit
bde8a0bde0
170 changed files with 35512 additions and 25 deletions
5
tracks/test/selenium/_login.rsel
Normal file
5
tracks/test/selenium/_login.rsel
Normal 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"
|
||||
|
|
@ -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"
|
||||
9
tracks/test/selenium/defer_todo_on_project_page.rsel
Normal file
9
tracks/test/selenium/defer_todo_on_project_page.rsel
Normal 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"
|
||||
8
tracks/test/selenium/login_failure.rsel
Normal file
8
tracks/test/selenium/login_failure.rsel
Normal 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'
|
||||
8
tracks/test/selenium/login_success.rsel
Normal file
8
tracks/test/selenium/login_success.rsel
Normal 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'
|
||||
|
|
@ -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"
|
||||
4
tracks/test/selenium/mark_todo_complete_1.rsel
Normal file
4
tracks/test/selenium/mark_todo_complete_1.rsel
Normal 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']"
|
||||
5
tracks/test/selenium/mark_todo_complete_2.rsel
Normal file
5
tracks/test/selenium/mark_todo_complete_2.rsel
Normal 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'
|
||||
5
tracks/test/selenium/mark_todo_incomplete.rsel
Normal file
5
tracks/test/selenium/mark_todo_incomplete.rsel
Normal 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"
|
||||
Loading…
Add table
Add a link
Reference in a new issue