diff options
| author | Xavier Morel <xmo@odoo.com> | 2020-01-30 09:56:58 +0000 |
|---|---|---|
| committer | Xavier Morel <xmo@odoo.com> | 2020-01-30 12:33:05 +0000 |
| commit | c4e075cf04f598d824469092b0043b3924c0fad0 (patch) | |
| tree | 7d2c68c1b0ae59e0bbb24b340d6b313a2cda606d /addons/web/static/src | |
| parent | f99f4db134fae2d22ec3cc1cf98b189e253bd4c3 (diff) | |
[IMP] core, web: test failure reporting
* remove misleading documentation about a "test failed" message, in
13.0 any uncaught exception or console.error will cause the current
test to be interpreted as failed
* fix tour manager to console.error its step and not add a second
useless error message
* fix menu tester to try and display the failure cause on failure
* improve qunit's test reporter to print the number of tests failed in
case of test suite failure
Should make test failures in tours a bit clearer.
closes odoo/odoo#44296
X-original-commit: 78121b68d099b16f2d775a7a8a963a2a0f474843
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/tools/test_menus.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/addons/web/static/src/js/tools/test_menus.js b/addons/web/static/src/js/tools/test_menus.js index 224df93a008..1875c0e776e 100644 --- a/addons/web/static/src/js/tools/test_menus.js +++ b/addons/web/static/src/js/tools/test_menus.js @@ -79,14 +79,13 @@ var testPromise = Promise.resolve(); testPromise = chainDeferred($listOfAppMenuItems, testPromise, testApp); return testPromise.then(function () { + console.log("Test took ", (performance.now() - startTime) / 1000, " seconds"); console.log("Successfully tested ", testedApps.length, " apps"); console.log("Successfully tested ", testedMenus.length - testedApps.length, " menus"); console.log("test successful"); + }).catch(function (error) { console.log("Test took ", (performance.now() - startTime) / 1000, " seconds"); - }).catch(function () { - console.log("Test took ", (performance.now() - startTime) / 1000, " seconds"); - console.error('test failed') - console.error("Error !"); + console.error(error || 'test failed'); }); } |
