Got one Selenium test working

This commit is contained in:
Eric Allen 2009-10-02 18:55:23 -04:00
parent d0e6ebd41e
commit eac798d0bf
2 changed files with 15 additions and 10 deletions

View file

@ -115,9 +115,14 @@ $.fn.clearForm = function() {
/* Set up authenticity token proplery */
$(document).ajaxSend(function(event, request, settings) {
if ( settings.type == 'POST' ) {
settings.data = (settings.data ? settings.data + "&" : "")
+ "authenticity_token=" + encodeURIComponent( AUTH_TOKEN ) + "&"
+ "_source_view=" + encodeURIComponent( SOURCE_VIEW );
if(typeof(AUTH_TOKEN) != 'undefined'){
settings.data = (settings.data ? settings.data + "&" : "")
+ "authenticity_token=" + encodeURIComponent( AUTH_TOKEN ) + "&"
+ "_source_view=" + encodeURIComponent( SOURCE_VIEW );
} else {
settings.data = (settings.data ? settings.data + "&" : "")
+ "_source_view=" + encodeURIComponent( SOURCE_VIEW );
}
request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
}
request.setRequestHeader("Accept", "text/javascript");
@ -370,7 +375,7 @@ $(document).ready(function() {
};
$.post('/contexts/update/'+context_id, {'context[name]': value}, highlight);
return(value);
}, {style: 'padding:0px'});
}, {style: 'padding:0px', submit: "OK"});
/* Projects behavior */
$('.alphabetize_link').click(function(evt){