[FIX] web: qunit: always log name of failing qunit-fixture content test

Follow-up of odoo/odoo@598d036b59

closes odoo/odoo#64171

X-original-commit: b4ceaa06b2c3ca4b9a1e95dc815d18867c49fd80
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
This commit is contained in:
Pierre Paridans
2021-01-06 16:58:56 +00:00
parent b3277372ef
commit 996c2eadf1
@@ -183,6 +183,7 @@ QUnit.on('OdooAfterTestHook', function (info) {
// check for leftovers in #qunit-fixture
const qunitFixture = document.getElementById('qunit-fixture');
if (qunitFixture.children.length) {
console.error(`Test ${info.moduleName} > ${info.testName}`);
console.error('#qunit-fixture still contains elements:' +
'\n#qunit-fixture HTML:\n' + qunitFixture.outerHTML);
QUnit.pushFailure(`#qunit-fixture still contains elements`);