[IMP] web: improve qunit logging and config

When a qunit test fails, the log only contains the assertion message.
This is in fact useful to have the "actual" and "expected" values to
understand the bug.

Also, we recently updated the configuration so that the "hide passed
tests" option is enabled by default. This is in fact useful to have
it disabled if the user wants to run only one test (debugging).
This commit is contained in:
qsm-odoo
2017-05-11 10:39:06 +02:00
parent ac7da497a2
commit c44578ee1a
@@ -36,7 +36,7 @@ QUnit.config.testTimeout = 1 * 60 * 1000;
/**
* Hide passed tests by default in the QUnit page
*/
QUnit.config.hidepassed = true;
QUnit.config.hidepassed = (window.location.href.match(/[?&]testId=/) === null);
var sortButtonAppended = false;
@@ -67,6 +67,8 @@ QUnit.log(function( result) {
console.log('"' + result.name + '"',
'in section', '"' + result.module + '"',
'failed:', result.message);
console.log('actual:', result.actual);
console.log('expected:', result.expected);
}
});