Fixed the bugged test window replicating tests

This commit is contained in:
benmcmahon100
2015-08-25 14:43:34 +01:00
parent b0a572bbfc
commit 473d40baa8

View File

@ -462,21 +462,6 @@ var runTests = function(err, data) {
allTestsPassed = false; allTestsPassed = false;
showCompletion(); 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() + "<script src = \"/js/lib/coursewares/iFrameScripts_0.0.4.js\"></script>");
codeStorage.updateStorage();
preview.close();
}
}
} }
}; };
@ -484,6 +469,7 @@ function bonfireExecute() {
attempts++; attempts++;
ga('send', 'event', 'Challenge', 'ran-code', challenge_Name); ga('send', 'event', 'Challenge', 'ran-code', challenge_Name);
userTests = null; userTests = null;
$('#testSuite').empty();
if(challengeType !== "0"){ if(challengeType !== "0"){
var userJavaScript = myCodeMirror.getValue(); var userJavaScript = myCodeMirror.getValue();
var failedCommentTest = false; var failedCommentTest = false;