[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
This commit is contained in:
Géry Debongnie
2018-11-28 13:38:21 +00:00
parent 0e40d843d5
commit 6eb217ef79
@@ -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 () {