From b2202cf711cd3bc19b36f416ea0e71edf2e53843 Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Mon, 6 Nov 2023 10:22:41 +0100 Subject: [PATCH] [FIX] web: MacroEngine: stop observing mutations in iframe The MacroEngine has a stop function that allows to completely disable it. Before this commit, it correctly disconnected the "main" mutation observer, but it didn't disconnect the mutation observer for iframes. In web_tour tests, we mock the MacroEngine to stop it at the end of tests, but this didn't stop the iframe mutation observer. This had an highly undesirable side-effect in tests: the qunit suite stopped during mass_mailing tests, because the iframe mutation observer detected a change which produced the log of "test successful", which ended the whole suite. Some tests were thus never run anymore (fortunately, we're only talking about a few qunit modules). closes odoo/odoo#141143 Signed-off-by: Christophe Monniez (moc) --- addons/web/static/src/core/macro.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/web/static/src/core/macro.js b/addons/web/static/src/core/macro.js index 8ba39f7d97b..ff27ad298cf 100644 --- a/addons/web/static/src/core/macro.js +++ b/addons/web/static/src/core/macro.js @@ -221,6 +221,7 @@ export class MacroEngine { browser.clearTimeout(this.timeout); this.timeout = null; this.observer.disconnect(); + this.iframeObserver.disconnect(); } }