[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:
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user