fixed a startup warning with TRACKS_VERSION, fix selenium tests for slow updates and add a new selenium test for #688

git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@799 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
lrbalt 2008-04-05 14:09:30 +00:00
parent 38b99c71bc
commit fabc5d8d0d
7 changed files with 43 additions and 2 deletions

View file

@ -85,8 +85,10 @@ end
MOBILE_CONTENT_TYPE = 'tracks/mobile'
Mime::Type.register(MOBILE_CONTENT_TYPE, :m)
TRACKS_VERSION = '1.5-trunk'
tracks_version = '1.5-trunk'
info = `svn info #{RAILS_ROOT} --config-dir /etc/subversion`[/Last Changed Rev: (.*?)\n/]
if info
TRACKS_VERSION += '-rev'+info[/(\d+)/]
tracks_version += '-rev'+info[/(\d+)/]
end
TRACKS_VERSION=tracks_version

View file

@ -0,0 +1,21 @@
# when you change a todo to a new context, the new context must show with
# the new todo
setup :fixtures => :all
login :as => 'admin'
open "/"
# change context of todo to new context
click "edit_icon_todo_12"
wait_for_visible "context_name_todo_12"
type "context_name_todo_12", "new context"
click "submit_todo_12"
# check that todo is removed from old context
wait_for_element_not_present "css=#c1 #todo_12"
# check if new context is shown and that the todo is also shown
wait_for_text_present 'new context'
# TODO: this check only looks for todo_12 but does not check if it is contained
# within the new context.
wait_for_element_not_present "#todo_12"

View file

@ -1,12 +1,19 @@
setup :fixtures => :all
login :as => 'admin'
open "/"
# we should start with 10 actions on home page
assert_text 'badge_count', '10'
# set project to hidden state
open "/projects/2"
click 'project_state_completed'
# wait for flash before navigating away from project page
wait_for_visible "flash"
# monitor badge count on home page. It should be 7 at the start
open "/"
wait_for_visible 'badge_count'
assert_text 'badge_count', '7'
# add todo to hidden project

View file

@ -4,6 +4,9 @@ login :as => 'admin'
# set project to hidden state
open "/projects/2"
click 'project_state_hidden'
# wait for flash before navigating away from project page to make sure that
# the changes have been saved
wait_for_visible "flash"
# monitor badge count on home page. It should be 7 at the start
open "/"

View file

@ -6,6 +6,9 @@ wait_for_element_present "no_context_msg"
open "/contexts"
type "context_name", "my first context"
click "context_new_submit"
# wait for new context to appear before navigating away from project page to
# make sure that the changes have been saved
wait_for_text_present 'DRAG'
open "/integrations"
wait_for_element_present "applescript1-contexts"

View file

@ -9,6 +9,10 @@ click "css=#add_note_href"
type "css=#new_note_body", "new note"
click "add-new-note"
# wait until new note is saved
wait_for_text_not_present "new note"
wait_for_text_present "new note"
# check badge count is one more
open "/notes/"
assert_text 'badge_count', '3'

View file

@ -17,6 +17,7 @@ wait_for_not_visible "flash"
type "todo_description", "test2"
click "css=#todo-form-new-action .submit_box button"
wait_for_visible "flash"
# check that context errand now contains 2 todos
open "/contexts/4"