From 8ef0e77e461c30ce86ffc9813e6c316d16c19ac1 Mon Sep 17 00:00:00 2001 From: Renzo Lucioni Date: Sun, 11 Jan 2015 16:08:29 -0500 Subject: [PATCH] Prevent Jasmine tests from redirecting in dev mode Also prevent Jasmine from attempting to load deleted templates --- lms/static/js/spec/student_account/access_spec.js | 3 +++ .../js/spec/verify_student/make_payment_step_view_spec.js | 1 - lms/static/js/spec/verify_student/pay_and_verify_view_spec.js | 2 -- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lms/static/js/spec/student_account/access_spec.js b/lms/static/js/spec/student_account/access_spec.js index 110c5bf6cc..212269ca45 100644 --- a/lms/static/js/spec/student_account/access_spec.js +++ b/lms/static/js/spec/student_account/access_spec.js @@ -157,6 +157,9 @@ define([ it('toggles between the login and registration forms', function() { ajaxSpyAndInitialize(this, 'login'); + // Prevent URL from updating + spyOn(history, 'pushState').andCallFake( function() {} ); + // Simulate selection of the registration form selectForm('register'); assertForms('#register-form', '#login-form'); diff --git a/lms/static/js/spec/verify_student/make_payment_step_view_spec.js b/lms/static/js/spec/verify_student/make_payment_step_view_spec.js index eb0fa26ecb..6da5b85d34 100644 --- a/lms/static/js/spec/verify_student/make_payment_step_view_spec.js +++ b/lms/static/js/spec/verify_student/make_payment_step_view_spec.js @@ -136,7 +136,6 @@ define([ setFixtures( '
' ); TemplateHelpers.installTemplate( 'templates/verify_student/make_payment_step' ); - TemplateHelpers.installTemplate( 'templates/verify_student/requirements' ); }); it( 'allows users to choose a suggested price', function() { diff --git a/lms/static/js/spec/verify_student/pay_and_verify_view_spec.js b/lms/static/js/spec/verify_student/pay_and_verify_view_spec.js index baf3edbdf3..0998945932 100644 --- a/lms/static/js/spec/verify_student/pay_and_verify_view_spec.js +++ b/lms/static/js/spec/verify_student/pay_and_verify_view_spec.js @@ -12,8 +12,6 @@ define(['jquery', 'js/common_helpers/template_helpers', 'js/verify_student/views 'intro_step', 'make_payment_step', 'payment_confirmation_step', - 'progress', - 'requirements', 'review_photos_step', 'webcam_photo' ];