j.francisco
2008-Jul-25 21:12 UTC
doing Selenium tests and :confirm inside a link_to_remote does not work
Hello there. I have a problem doing Selenium tests. When I try to test my delete method doesn''t prompt me the respective alert which otherwise would appears before run the destroy method on the controller. Without Selenium the application prompt me as the regular way but within Selenium things go badly. Here is a part of my view: <%=link_to_remote image_tag(''/images/trash_can.gif'', :border => 0), :confirm => ''Delete Schema ''+schema.name+''?'', :url=>{:controller=>:schema,:action=>:delete,:id=>schema.id}, :before=>"$(''shownDiv#{schema.id}'').visualEffect(''highlight'', {duration:3});", :complete=>"$(''shownDiv#{schema.id}'').shrink();$ (''inline#{schema.id}'').hide();"%> Yes, I am using a bit of RJS, is that what cause this weird behavior? And in the controller I have. def delete @schema = Schema.find(params[:id]) @schema.destroy respond_to do |format| format.js end end Actually my main concern if this behavior could impact negatively in the performance of the application in other different environments, let''s say, browsers. Thanks!! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---