From 473d40baa8e5bff8550ea027a312e7ded71a0701 Mon Sep 17 00:00:00 2001 From: benmcmahon100 Date: Tue, 25 Aug 2015 14:43:34 +0100 Subject: [PATCH] Fixed the bugged test window replicating tests --- public/js/lib/coursewares/commonFrameWork.js | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/public/js/lib/coursewares/commonFrameWork.js b/public/js/lib/coursewares/commonFrameWork.js index 68137481fe..935d560ed9 100644 --- a/public/js/lib/coursewares/commonFrameWork.js +++ b/public/js/lib/coursewares/commonFrameWork.js @@ -462,21 +462,6 @@ var runTests = function(err, data) { allTestsPassed = false; showCompletion(); } - else{ - if(challengeType === "0"){ - $('#testSuite').empty(); - - editorValueForIFrame = editor.getValue(); - goodTests = 0; - var previewFrame = document.getElementById('preview'); - var preview = previewFrame.contentDocument || previewFrame.contentWindow.document; - preview.open(); - preview.write(libraryIncludes + editor.getValue() + ""); - codeStorage.updateStorage(); - preview.close(); - } - } - } }; @@ -484,6 +469,7 @@ function bonfireExecute() { attempts++; ga('send', 'event', 'Challenge', 'ran-code', challenge_Name); userTests = null; + $('#testSuite').empty(); if(challengeType !== "0"){ var userJavaScript = myCodeMirror.getValue(); var failedCommentTest = false;