Always output tests in the order ran ignoring success or failure. Bump version numbers of framework files to force fresh browser fetches.

This commit is contained in:
terakilobyte
2015-06-04 22:35:42 -04:00
parent 8008997fbb
commit f002e7c3f7
5 changed files with 10 additions and 8 deletions

View File

@ -78,19 +78,20 @@ setTimeout(updatePreview, 300);
* "post" methods * "post" methods
*/ */
var testResults = [];
var postSuccess = function(data) { var postSuccess = function(data) {
var testDoc = document.createElement("div"); var testDoc = document.createElement("div");
$(testDoc) $(testDoc)
.html("<div class='row'><div class='col-xs-2 text-center'><i class='ion-checkmark-circled big-success-icon'></i></div><div class='col-xs-10 test-output test-vertical-center wrappable'>" + JSON.parse(data) + "</div></div><div class='ten-pixel-break'/>") .html("<div class='row'><div class='col-xs-2 text-center'><i class='ion-checkmark-circled big-success-icon'></i></div><div class='col-xs-10 test-output test-vertical-center wrappable'>" + JSON.parse(data) + "</div></div><div class='ten-pixel-break'/>");
.appendTo($('#testSuite')); $('#testSuite').append(testDoc);
testSuccess(); testSuccess();
}; };
var postError = function(data) { var postError = function(data) {
var testDoc = document.createElement("div"); var testDoc = document.createElement("div");
$(testDoc) $(testDoc)
.html("<div class='row'><div class='col-xs-2 text-center'><i class='ion-close-circled big-error-icon'></i></div><div class='col-xs-10 test-vertical-center test-output wrappable'>" + JSON.parse(data) + "</div></div><div class='ten-pixel-break'/>") .html("<div class='row'><div class='col-xs-2 text-center'><i class='ion-close-circled big-error-icon'></i></div><div class='col-xs-10 test-vertical-center test-output wrappable'>" + JSON.parse(data) + "</div></div><div class='ten-pixel-break'/>");
.prependTo($('#testSuite')) $('#testSuite').append(testDoc);
}; };
var goodTests = 0; var goodTests = 0;
var testSuccess = function() { var testSuccess = function() {
@ -99,6 +100,7 @@ var testSuccess = function() {
showCompletion(); showCompletion();
} }
}; };
var challengeSeed = challengeSeed || null; var challengeSeed = challengeSeed || null;
var allSeeds = ''; var allSeeds = '';
(function() { (function() {

View File

@ -183,7 +183,7 @@ var createTestDisplay = function() {
console.log('Should be displaying bad tests'); console.log('Should be displaying bad tests');
$(testDoc) $(testDoc)
.html("<div class='row'><div class='col-xs-2 text-center'><i class='ion-close-circled big-error-icon'></i></div><div class='col-xs-10 test-output wrappable test-vertical-center grayed-out-test-output'>" + test.text + "</div><div class='col-xs-10 test-output wrappable'>" + test.err + "</div></div><div class='ten-pixel-break'/>") .html("<div class='row'><div class='col-xs-2 text-center'><i class='ion-close-circled big-error-icon'></i></div><div class='col-xs-10 test-output wrappable test-vertical-center grayed-out-test-output'>" + test.text + "</div><div class='col-xs-10 test-output wrappable'>" + test.err + "</div></div><div class='ten-pixel-break'/>")
.prependTo($('#testSuite')) .appendTo($('#testSuite'));
} else { } else {
$(testDoc) $(testDoc)
.html("<div class='row'><div class='col-xs-2 text-center'><i class='ion-checkmark-circled big-success-icon'></i></div><div class='col-xs-10 test-output test-vertical-center wrappable grayed-out-test-output'>" + test.text + "</div></div><div class='ten-pixel-break'/>") .html("<div class='row'><div class='col-xs-2 text-center'><i class='ion-checkmark-circled big-success-icon'></i></div><div class='col-xs-10 test-output test-vertical-center wrappable grayed-out-test-output'>" + test.text + "</div></div><div class='ten-pixel-break'/>")

View File

@ -125,7 +125,7 @@ block content
form.code form.code
.form-group.codeMirrorView .form-group.codeMirrorView
textarea#codeEditor(autofocus=true, style='display: none;') textarea#codeEditor(autofocus=true, style='display: none;')
script(src='/js/lib/coursewares/coursewaresJSFramework_0.0.4.js') script(src='/js/lib/coursewares/coursewaresJSFramework_0.0.5.js')
#complete-courseware-dialog.modal(tabindex='-1') #complete-courseware-dialog.modal(tabindex='-1')
.modal-dialog.animated.zoomIn.fast-animation .modal-dialog.animated.zoomIn.fast-animation

View File

@ -92,4 +92,4 @@ block content
span.completion-icon.ion-checkmark-circled.text-primary span.completion-icon.ion-checkmark-circled.text-primary
a.animated.fadeIn.btn.btn-lg.signup-btn.btn-block(href='/login') Sign in so you can save your progress a.animated.fadeIn.btn.btn-lg.signup-btn.btn-block(href='/login') Sign in so you can save your progress
include ../partials/challenge-modals include ../partials/challenge-modals
script(src="/js/lib/coursewares/coursewaresHCJQFramework_0.1.7.js") script(src="/js/lib/coursewares/coursewaresHCJQFramework_0.1.8.js")

View File

@ -67,7 +67,7 @@ block content
form.code form.code
.form-group.codeMirrorView .form-group.codeMirrorView
textarea#codeEditor(autofocus=true, style='display: none;') textarea#codeEditor(autofocus=true, style='display: none;')
script(src='/js/lib/coursewares/coursewaresJSFramework_0.0.4.js') script(src='/js/lib/coursewares/coursewaresJSFramework_0.0.5.js')
#complete-courseware-dialog.modal(tabindex='-1') #complete-courseware-dialog.modal(tabindex='-1')
.modal-dialog.animated.zoomIn.fast-animation .modal-dialog.animated.zoomIn.fast-animation
.modal-content .modal-content