From 96fcefb6f1fe3fb5a5f197e2635e6d71d9a1d9dd Mon Sep 17 00:00:00 2001 From: Julien Mougenot Date: Fri, 19 Jun 2020 07:06:29 +0000 Subject: [PATCH] [IMP] web: qunit: remove tooltips after each test Leftover tooltips may make following tests fail, which isn't what we want as a test shouldn't impact another one. X-original-commit: 17a4c72b9a86186c7690bdba5e62ccd64ab2f77a --- addons/web/static/tests/helpers/qunit_config.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/web/static/tests/helpers/qunit_config.js b/addons/web/static/tests/helpers/qunit_config.js index ce235ab3ecf..1cc44ea18ba 100644 --- a/addons/web/static/tests/helpers/qunit_config.js +++ b/addons/web/static/tests/helpers/qunit_config.js @@ -188,6 +188,10 @@ QUnit.on('OdooAfterTestHook', function () { } } + for (const tooltip of document.querySelectorAll('.tooltip')) { + tooltip.remove(); + } + // check for leftovers in #qunit-fixture var qunitFixture = document.getElementById('qunit-fixture'); if (qunitFixture.children.length) {