From 1280ab76656be3413b9f29e0be94152219079440 Mon Sep 17 00:00:00 2001 From: lukemelia Date: Tue, 10 Jul 2007 04:16:08 +0000 Subject: [PATCH] Add selenium test case to test problem reported in #533. git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@563 a4c988fc-2ded-0310-b66e-134b36920a42 --- tracks/test/fixtures/contexts.yml | 9 +++++++++ tracks/test/functional/contexts_controller_test.rb | 4 ++-- .../home/change_todo_context_to_hidden_context.rsel | 8 ++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 tracks/test/selenium/home/change_todo_context_to_hidden_context.rsel diff --git a/tracks/test/fixtures/contexts.yml b/tracks/test/fixtures/contexts.yml index a6ac6f0b..0991767f 100644 --- a/tracks/test/fixtures/contexts.yml +++ b/tracks/test/fixtures/contexts.yml @@ -104,3 +104,12 @@ waitingfor_otheruser: user_id: 2 created_at: <%= today %> updated_at: <%= today %> + +someday_maybe: + id: 12 + name: someday maybe + position: 10 + hide: true + user_id: 1 + created_at: <%= today %> + updated_at: <%= today %> diff --git a/tracks/test/functional/contexts_controller_test.rb b/tracks/test/functional/contexts_controller_test.rb index 71bedb88..cc054a14 100644 --- a/tracks/test/functional/contexts_controller_test.rb +++ b/tracks/test/functional/contexts_controller_test.rb @@ -53,7 +53,7 @@ class ContextsControllerTest < TodoContainerControllerTestBase assert_select 'language', 'en-us' assert_select 'ttl', '40' end - assert_select 'item', 9 do + assert_select 'item', 10 do assert_select 'title', /.+/ assert_select 'description' do assert_select_encoded do @@ -95,7 +95,7 @@ class ContextsControllerTest < TodoContainerControllerTestBase assert_xml_select 'feed[xmlns="http://www.w3.org/2005/Atom"]' do assert_select '>title', 'Tracks Contexts' assert_select '>subtitle', "Lists all the contexts for #{users(:admin_user).display_name}" - assert_select 'entry', 9 do + assert_select 'entry', 10 do assert_select 'title', /.+/ assert_select 'content[type="html"]' do assert_select_encoded do diff --git a/tracks/test/selenium/home/change_todo_context_to_hidden_context.rsel b/tracks/test/selenium/home/change_todo_context_to_hidden_context.rsel new file mode 100644 index 00000000..3212e75f --- /dev/null +++ b/tracks/test/selenium/home/change_todo_context_to_hidden_context.rsel @@ -0,0 +1,8 @@ +setup :fixtures => :all +login :as => 'admin' +open "/" +click "edit_icon_todo_12" +wait_for_visible "context_name_todo_12" +type "context_name_todo_12", "someday maybe" +click "submit_todo_12" +wait_for_element_not_present "todo_12" \ No newline at end of file