From 29e1de8ef268fc595acc4db9b8f15db9dffedd46 Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Fri, 28 Oct 2011 20:51:02 +0200 Subject: [PATCH] fix failing selenium tests --- app/views/projects/update.js.erb | 2 +- features/step_definitions/project_steps.rb | 2 +- public/javascripts/application.js | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/projects/update.js.erb b/app/views/projects/update.js.erb index 45b7df79..270a38b0 100644 --- a/app/views/projects/update.js.erb +++ b/app/views/projects/update.js.erb @@ -30,7 +30,7 @@ function update_project_page() { remove_project_edit_form(); update_and_show_project_settings(); TracksForm.set_project_name("<%= escape_javascript(@project.name)%>"); - $("h2#project_name").html("<%= escape_javascript(@project.name)%>"); + $("h2 div#project_name").html("<%= escape_javascript(@project.name)%>"); <% if @project.default_context %> TracksForm.set_context_name_and_default_context_name("<%= escape_javascript(@project.default_context.name)%>"); <% end %> diff --git a/features/step_definitions/project_steps.rb b/features/step_definitions/project_steps.rb index cfb3589d..145cbd06 100644 --- a/features/step_definitions/project_steps.rb +++ b/features/step_definitions/project_steps.rb @@ -274,7 +274,7 @@ end Then /^the project title should be "(.*)"$/ do |title| wait_for :timeout => 2 do - selenium.get_text("css=h2#project_name") == title + selenium.get_text("css=h2#project_name_container div#project_name") == title end end diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 280bf6bf..7e5ec824 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -305,19 +305,19 @@ var TracksPages = { $(".todo_notes").toggle(); }); - + /* Poor man's perspectives, allows to hide any context that is collapsed */ $("#toggle-contexts-nav").click(function () { /* Need to keep a single toggle across all contexts */ - $(this).toggleClass("context_visibility"); + $(this).toggleClass("context_visibility"); if ($(this).hasClass("context_visibility")) { $(".context_collapsed").hide(); /* Hide all collapsed contexts together*/ } else { - $(".context_collapsed").show(); + $(".context_collapsed").show(); } }); - + /* fade flashes and alerts in automatically */ $(".alert").fadeOut(8000); }