diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index 40e31bbb..783b3f82 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -46,10 +46,6 @@
- <%= link_to(t('layouts.toggle_contexts'), "#", {:title => t('layouts.toggle_contexts_title'), :id => "toggle-contexts-nav"}) %>
- |
- <%= link_to(t('layouts.toggle_notes'), "#", {:accesskey => "S", :title => t('layouts.toggle_notes_title'), :id => "toggle-notes-nav"}) %>
- |
<%= link_to("#{t('common.logout')} (#{current_user.display_name}) »".html_safe, logout_path) %>
@@ -66,13 +62,15 @@
<%= navigation_link( t('layouts.navigation.recurring_todos'), {:controller => "recurring_todos", :action => "index"}, :title => t('layouts.navigation.recurring_todos_title')) %>
-
<%= t('layouts.navigation.view') %>
+
diff --git a/features/notes_manage.feature b/features/notes_manage.feature
index 6c16826e..fa3c8924 100644
--- a/features/notes_manage.feature
+++ b/features/notes_manage.feature
@@ -42,7 +42,7 @@ Feature: View, add, remove notes
And I edit the first note to "edited note"
Then I should see "edited note"
- @javascript
+ @javascript
Scenario: Toggle all notes
Given I have a context called "@pc"
And I have a project "take notes" that has the following todos
diff --git a/features/step_definitions/container_steps.rb b/features/step_definitions/container_steps.rb
index 0fa984a3..c75838ae 100644
--- a/features/step_definitions/container_steps.rb
+++ b/features/step_definitions/container_steps.rb
@@ -11,7 +11,9 @@ When(/^I collapse the project container of "(.*?)"$/) do |project_name|
end
When /^I toggle all collapsed context containers$/ do
- click_link 'Toggle collapsed contexts'
+ open_view_menu do
+ click_link 'Toggle collapsed contexts'
+ end
end
####### Context #######
diff --git a/features/step_definitions/note_steps.rb b/features/step_definitions/note_steps.rb
index b8060fd6..eebd1e4e 100644
--- a/features/step_definitions/note_steps.rb
+++ b/features/step_definitions/note_steps.rb
@@ -30,7 +30,7 @@ When /^I edit the first note to "([^"]*)"$/ do |note_body|
end
end
-When /^I toggle the note of "([^"]*)"$/ do |todo_description|
+When(/^I toggle the note of "([^"]*)"$/) do |todo_description|
todo = @current_user.todos.where(:description => todo_description).first
todo.should_not be_nil
@@ -39,7 +39,9 @@ When /^I toggle the note of "([^"]*)"$/ do |todo_description|
end
When /^I click Toggle Notes$/ do
- click_link 'Toggle notes'
+ open_view_menu do
+ click_link 'Toggle notes'
+ end
end
When /^I toggle all notes$/ do
diff --git a/features/support/tracks_step_helper.rb b/features/support/tracks_step_helper.rb
index 67fe0102..b9bbd3e1 100644
--- a/features/support/tracks_step_helper.rb
+++ b/features/support/tracks_step_helper.rb
@@ -97,6 +97,23 @@ module TracksStepHelper
execute_javascript("$('#{sortable_css}').simulateDragSortable({move: #{delta}, handle: '.grip'});")
end
+ def open_view_menu
+ view_menu = "ul.sf-menu li#menu_view"
+
+ # click menu
+ view_menu_link = "#{view_menu} a#menu_view_link"
+ page.should have_css(view_menu_link, :visible => true)
+ page.find(view_menu_link).click
+
+ # wait for menu to be visible
+ view_menu_item = "#{view_menu} li#menu_view_toggle_contexts"
+ page.should have_css(view_menu_item)
+
+ within view_menu do
+ yield
+ end
+ end
+
def open_submenu_for(todo)
submenu_arrow = "div#line_todo_#{todo.id} img.todo-submenu"
page.should have_css(submenu_arrow, :visible=>true)
diff --git a/features/toggle_containers.feature b/features/toggle_containers.feature
index ce01b982..e8da11cd 100644
--- a/features/toggle_containers.feature
+++ b/features/toggle_containers.feature
@@ -60,7 +60,7 @@ Feature: Toggle the containers
And I should not see the todo "test 2"
And I should not see the todo "test 3"
- @javascript
+ @javascript
Scenario: I can hide all collapsed context containers
Given I have the following contexts
| context | hide |
@@ -87,7 +87,7 @@ Feature: Toggle the containers
And I should not see the context container for "@boss"
And I should not see the context container for "@ipad"
- @javascript
+ @javascript
Scenario: I can hide all collapsed project containers
Given I have the following contexts
| context | hide |