From 10453ad9651431d25b72933091dd9969802b4b13 Mon Sep 17 00:00:00 2001 From: lrbalt Date: Thu, 10 Apr 2008 20:05:55 +0000 Subject: [PATCH] adds a selenium test for #691. Needed to add a span around the description for the test git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@813 a4c988fc-2ded-0310-b66e-134b36920a42 --- tracks/app/views/todos/_todo.rhtml | 4 ++-- ..._new_todo_in_context_and_hide_context.rsel | 21 +++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 tracks/test/selenium/home/create_new_todo_in_context_and_hide_context.rsel diff --git a/tracks/app/views/todos/_todo.rhtml b/tracks/app/views/todos/_todo.rhtml index d49753f6..6f8579c2 100644 --- a/tracks/app/views/todos/_todo.rhtml +++ b/tracks/app/views/todos/_todo.rhtml @@ -10,8 +10,8 @@ <%= remote_star_icon %> <%= remote_toggle_checkbox unless source_view_is :deferred %>
- <%= date_span %> - <%= sanitize(todo.description) %> + <%= date_span -%> + <%= sanitize(todo.description) %> <%= tag_list %> <%= deferred_due_date %> <%= project_and_context_links( parent_container_type, :suppress_context => suppress_context, :suppress_project => suppress_project ) %> diff --git a/tracks/test/selenium/home/create_new_todo_in_context_and_hide_context.rsel b/tracks/test/selenium/home/create_new_todo_in_context_and_hide_context.rsel new file mode 100644 index 00000000..64ff3ed9 --- /dev/null +++ b/tracks/test/selenium/home/create_new_todo_in_context_and_hide_context.rsel @@ -0,0 +1,21 @@ +# adding a new action to context and collapsing context should remove +# all actions in context including the newly added one + +setup :fixtures => :all +login :as => 'admin' +open "/" + +assert_element_present "todo_9" + +# add new action to existing context +type "todo_description", "a new action" +type "todo_context_name", "Agenda" +click "css=#todo-form-new-action .submit_box button" +wait_for_visible "flash" + +# toggle Agenda context c1 and wait until the context has collapsed +click "css=#toggle_c1" +wait_for_not_visible "todo_9" + +# check that newly added action is not there +wait_for_not_visible "xpath=//span[text()='a new action']" \ No newline at end of file