From 6eb217ef7927f5fac7186fbe4f06e563b4223b0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Wed, 28 Nov 2018 13:22:12 +0000 Subject: [PATCH] [FIX] web: properly cleanup after notification tests The NotificationService has a side effect: it adds a div inside document.body. We could implement a cleanup mechanism for services, but this seems a little overkill since services are not supposed to be destroyed anyway. closes odoo/odoo#29099 --- .../web/static/tests/services/notification_service_tests.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addons/web/static/tests/services/notification_service_tests.js b/addons/web/static/tests/services/notification_service_tests.js index 04c7ea5e1ef..8a10b9f2df9 100644 --- a/addons/web/static/tests/services/notification_service_tests.js +++ b/addons/web/static/tests/services/notification_service_tests.js @@ -31,6 +31,11 @@ QUnit.module('Services', { }; }, afterEach: function () { + // The Notification Service has a side effect: it adds a div inside + // document.body. We could implement a cleanup mechanism for services, + // but this seems a little overkill since services are not supposed to + // be destroyed anyway. + $('.o_notification_manager').remove(); testUtils.mock.unpatch(Notification); } }, function () {