From e9277676b2a7627b1fa5ecb5710ffdd5700db1bf Mon Sep 17 00:00:00 2001 From: tim madden Date: Tue, 20 Dec 2011 10:35:21 -0600 Subject: [PATCH] updates to tests for changes to mobile interface Updated mobile_add_action.feature with new navigation text Updated modile_edit_a_todo.feature to not look for removed 'done' checkbox in the edit form, but to use the previously created "mark complete" button. Added completed_container to mobile_actions so the test could find the completed todo that is no longer not visible --- app/views/todos/_mobile_actions.rhtml | 2 ++ features/mobile_add_action.feature | 4 ++-- features/mobile_edit_a_todo.feature | 7 +++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/views/todos/_mobile_actions.rhtml b/app/views/todos/_mobile_actions.rhtml index 794b055e..2d45c0ee 100644 --- a/app/views/todos/_mobile_actions.rhtml +++ b/app/views/todos/_mobile_actions.rhtml @@ -4,8 +4,10 @@ <%= render :partial => "contexts/mobile_context", :collection => @contexts_to_show -%> <% end -%> <% unless @done.nil? -%> +

<%= t('todos.completed_actions') %>

+
<% end %> diff --git a/features/mobile_add_action.feature b/features/mobile_add_action.feature index 80d9939d..86537d9f 100644 --- a/features/mobile_add_action.feature +++ b/features/mobile_add_action.feature @@ -14,7 +14,7 @@ Feature: Add new next action from mobile page Scenario Outline: The new action form is prefilled with context and project Given I am on the - When I follow "0-New action" + When I follow "New" Then the selected project should be "" And the selected context should be "" @@ -29,7 +29,7 @@ Feature: Add new next action from mobile page Scenario: I can add a new todo using the mobile interface Given I am on the home page Then the badge should show 0 - When I follow "0-New action" + When I follow "New" And I fill in "Description" with "test me" And I press "Create" Then I should see "test me" diff --git a/features/mobile_edit_a_todo.feature b/features/mobile_edit_a_todo.feature index 5726d99a..3589d072 100644 --- a/features/mobile_edit_a_todo.feature +++ b/features/mobile_edit_a_todo.feature @@ -14,6 +14,7 @@ Feature: Edit a next action from the mobile view | context | description | | @mobile | test action | + @selenium Scenario: I can edit an action on the mobile page When I am on the home page Then the badge should show 1 @@ -27,10 +28,8 @@ Feature: Edit a next action from the mobile view Then I should see "changed action" And I should not see "test action" When I follow "changed action" - And I press "Edit this action" - And I check "done" - And I press "Update" - Then I should not see "changed action" + And I press "Mark complete" + Then I should see "changed action" in the completed container Scenario: Navigate from home page move this to separate features when other scenarios are created for these features