* fixing recording-based tests and one checkout test

This commit is contained in:
Seth Call 2015-04-24 12:09:22 -05:00
parent e4bd80a3c3
commit d94388161c
4 changed files with 17 additions and 12 deletions

View File

@ -353,6 +353,7 @@
userDeferred = new $.Deferred();
userDeferred.reject('not_logged_in');
}
return userDeferred;
}
this.activeElementEvent = function(evtName, data) {

View File

@ -29,18 +29,22 @@
function proceedCheckout(e) {
e.preventDefault();
logger.debug("proceedCheckout")
if (!context.JK.currentUserId) {
logger.debug("proceeding to signin screen because there is no user")
window.location = '/client#/checkoutSignin';
}
else {
app.user().done(function(user) {
if(user.has_recurly_account && user.reuse_card) {
window.location = '/client#/checkoutOrder';
}
else {
window.location = '/client#/checkoutPayment';
}
})
var user = app.currentUser();
if(user.has_recurly_account && user.reuse_card) {
logger.debug("proceeding to checkout order screen because we have card info already")
window.location = '/client#/checkoutOrder';
}
else {
logger.debug("proceeding to checkout payment screen because we do not have card info")
window.location = '/client#/checkoutPayment';
}
}
}

View File

@ -25,11 +25,11 @@
%textarea#claim-recording-description.w100{:name => "description"}
-if (Rails.application.config.video_available=="full") || (current_user && current_user.admin)
.field.left{:purpose => "save_video"}
%input{:checked => "checked", :name => "save_video", :type => "checkbox"}/
%input{:name => "save_video", :type => "checkbox"}/
%label{:for => "save_video"} Save Video to Computer
.field.left{:purpose => "upload_to_youtube"}
%span
%input{:checked => "checked", :name => "upload_to_youtube", :type => "checkbox"}/
%input{:name => "upload_to_youtube", :type => "checkbox"}/
%label{:for => "upload_to_youtube"} Upload Video to YouTube
%span
= render(:partial => "shared/google_login")

View File

@ -550,7 +550,7 @@ describe "Checkout", :js => true, :type => :feature, :capybara_feature => true d
find('.thanks-detail.jam-tracks-in-browser')
# find the 'go download jamkazam button' that shows if your first_download_client_at is null
find('.thanks-detail .download-jamkazam-wrapper').trigger(:click)
find('.click-to-download', text: 'Click the button below to download the JamKazam application installer.')
find('.download-jamkazam', text: 'Click Here to Get the Free JamKazam Application')
acdc = jamtrack_acdc_backinblack.right_for_user(user)
@ -714,7 +714,7 @@ describe "Checkout", :js => true, :type => :feature, :capybara_feature => true d
# should be taken straight to order page
# now see order page, and everything should appear free
# now see order page, and everything should no longer appear free
find('p.order-prompt')
find('.order-items-value.order-total', text:'$1.99')
find('.order-items-value.shipping-handling', text:'$0.00')