Skip to content

Commit

Permalink
Refactored to resolve issue with including form based JS events when …
Browse files Browse the repository at this point in the history
…no form is present.
  • Loading branch information
baphled committed Jul 5, 2010
1 parent 0dc45a8 commit f98cb0f
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 3 deletions.
6 changes: 6 additions & 0 deletions app/views/common/forms/_feature_import.html.erb
@@ -1,3 +1,9 @@
<% content_for :js_head do %>
<%= javascript_include_tag "form" %>
<%= javascript_include_tag "jquery.hover.dialog" %>
<%= javascript_include_tag "item_hover" %>
<% end %>

<h3>Feature: <%=h file[:file].sub(/\.feature/,"").gsub(/_/,' ') %></h3>
<%- form_for file[:feature], :html => {:id => "new_feature",:class => "new_feature hidden", :method => :post} do |f|%>
  <fieldset class="ui-tabs ui-widget ui-widget-content ui-corner-all">
Expand Down
3 changes: 3 additions & 0 deletions app/views/features/_form.html.erb
@@ -1,4 +1,7 @@
<% content_for :js_head do %>
<%= javascript_include_tag "form" %>
<%= javascript_include_tag "jquery.hover.dialog" %>
<%= javascript_include_tag "item_hover" %>
<%= javascript_include_tag "/javascripts/validations/feature" %>
<% end %>
Expand Down
4 changes: 1 addition & 3 deletions app/views/layouts/no_sidebar.html.erb
Expand Up @@ -20,9 +20,7 @@
<%= javascript_include_tag "inflection" %>
<%= javascript_include_tag "jquery.custom.validation" %>
<%= javascript_include_tag "jquery.render.flash.message" %>
<%= javascript_include_tag "form" %>
<%= javascript_include_tag "jquery.hover.dialog" %>
<%= javascript_include_tag "item_hover" %>
<%= javascript_include_tag "autoScroller" %>
<%= javascript_include_tag "scrollingHoverable" %>
<%= javascript_include_tag "jquery-validate" %>
Expand Down
3 changes: 3 additions & 0 deletions app/views/parking/new.html.erb
@@ -1,4 +1,7 @@
<% content_for :js_head do %>
<%= javascript_include_tag "form" %>
<%= javascript_include_tag "jquery.hover.dialog" %>
<%= javascript_include_tag "item_hover" %>
<%= javascript_include_tag "/javascripts/validations/resource" %>
<% end %>
Expand Down
3 changes: 3 additions & 0 deletions app/views/projects/_form.html.erb
@@ -1,4 +1,7 @@
<% content_for :js_head do %>
<%= javascript_include_tag "form" %>
<%= javascript_include_tag "jquery.hover.dialog" %>
<%= javascript_include_tag "item_hover" %>
<%= javascript_include_tag "/javascripts/validations/project" %>
<% end %>
Expand Down
3 changes: 3 additions & 0 deletions app/views/steps/_form.html.erb
@@ -1,6 +1,9 @@
<%= render :partial => "/common/hover_dialog" %>
<% content_for :js_head do %>
<%= javascript_include_tag "form" %>
<%= javascript_include_tag "jquery.hover.dialog" %>
<%= javascript_include_tag "item_hover" %>
<%= javascript_include_tag "/javascripts/validations/step" %>
<% end %>
Expand Down
3 changes: 3 additions & 0 deletions app/views/stories/_form.html.erb
Expand Up @@ -4,6 +4,9 @@
<% end %>
<% content_for :js_head do %>
<%= javascript_include_tag "form" %>
<%= javascript_include_tag "jquery.hover.dialog" %>
<%= javascript_include_tag "item_hover" %>
<%= javascript_include_tag "/javascripts/validations/story" %>
<%= javascript_include_tag "add_step" %>
<% end %>
Expand Down
8 changes: 8 additions & 0 deletions features/step_definitions/selenium_steps.rb
Expand Up @@ -124,6 +124,10 @@
response.should contain "#{message}"
end


Then /^the system merge page should be displayed$/ do
selenium.wait_for_visible("css=div#legend")
end
Then /^there should be a "([^\"]*)" link$/ do |link|
response.should have_selector :a do |content|
content.should contain "#{link}"
Expand Down Expand Up @@ -167,6 +171,10 @@
selenium.wait_for_visible("css=span#panel ul.icons > li a#import")
end

Then /^the panel icons should be visible$/ do
selenium.wait_for_visible("css=span#panel ul.icons")
end

Then /^I should see the imports page$/ do
selenium.wait_for_element("css=div#myTabs", :timeout_in_seconds => 60)
end
Expand Down

0 comments on commit f98cb0f

Please sign in to comment.