further improvements to coursewares and bonfires

pull/441/head
Quincy Larson 2015-05-10 22:33:04 -07:00
parent d63b8f01be
commit 68962d4d82
5 changed files with 7 additions and 7 deletions

View File

@ -729,7 +729,7 @@ div.CodeMirror-scroll {
}
.test-vertical-center {
margin-top: 15px;
margin-top: 8px;
}
.cm-s-monokai.CodeMirror {

View File

@ -201,7 +201,7 @@ var createTestDisplay = function() {
.prependTo($('#testSuite'))
} else {
$(testDoc)
.html("<div class='row'><div class='col-xs-1 text-center'><i class='ion-checkmark-circled big-success-icon'></i></div><div class='col-xs-11 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-1 text-center'><i class='ion-checkmark-circled big-success-icon'></i></div><div class='col-xs-11 test-output test-vertical-center wrappable '>" + test.text + "</div></div><div class='ten-pixel-break'/>")
.appendTo($('#testSuite'));
}
};

View File

@ -56,7 +56,7 @@ var allTests = '';
});
})();
var otherTestsForNow = "<script src='/js/lib/coursewares/iFrameScripts_.0.0.1.js'></script>";
var otherTestsForNow = "<script src='/js/lib/coursewares/iFrameScripts_0.0.1.js'></script>";
var delay;
// Initialize CodeMirror editor with a nice html5 canvas demo.
@ -92,7 +92,7 @@ var postSuccess = function(data) {
var postError = function(data) {
var testDoc = document.createElement("div");
$(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'>" + 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'))
};
var goodTests = 0;

View File

@ -182,7 +182,7 @@ var createTestDisplay = function() {
if (test.err != null) {
console.log('Should be displaying bad tests');
$(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 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'))
} else {
$(testDoc)

View File

@ -9,10 +9,10 @@
} catch (err) {
allTestsGood = false;
thisTest = false;
parent.postError(JSON.stringify(tests[i].message));
parent.postError(JSON.stringify(err.message.split(':').shift()));
} finally {
if (thisTest) {
parent.postSuccess(JSON.stringify(tests[i]));
parent.postSuccess(JSON.stringify(tests[i].split(',').pop().replace(/\'/g, '').replace(/\)/, '')));
}
}
}