diff --git a/addons/web/static/tests/utils.js b/addons/web/static/tests/utils.js index e42eee759c9..f428ec92f8f 100644 --- a/addons/web/static/tests/utils.js +++ b/addons/web/static/tests/utils.js @@ -327,7 +327,7 @@ class Contains { this.def.reject(e); // prevents infinite loop in case of programming error } }); - this.observer.observe(document.body, { + this.observer.observe(this.options.target, { attributes: true, childList: true, subtree: true, diff --git a/addons/website_livechat/static/tests/tours/website_livechat_chatbot_flow.js b/addons/website_livechat/static/tests/tours/website_livechat_chatbot_flow.js index fbd1f46dad3..f6733e2e8e8 100644 --- a/addons/website_livechat/static/tests/tours/website_livechat_chatbot_flow.js +++ b/addons/website_livechat/static/tests/tours/website_livechat_chatbot_flow.js @@ -49,7 +49,7 @@ registry.category("web_tour.tours").add("website_livechat_chatbot_flow_tour", { // the thread has been persisted in the process async run() { await contains(".o-mail-Message-actions [title='Add a Reaction']", { - target: this.$anchor[0], + target: this.$anchor[0].getRootNode(), parent: [".o-mail-Message", { text: "I want to buy the software" }], }); },