From d093fd4236a7c7f18645a85970cbdda6fec44c92 Mon Sep 17 00:00:00 2001 From: Julien Mougenot Date: Thu, 11 Jun 2020 14:46:43 +0000 Subject: [PATCH] [IMP] web: close button on non-sticky notifications --- addons/web/static/src/xml/notification.xml | 2 +- .../web/static/tests/services/notification_service_tests.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/web/static/src/xml/notification.xml b/addons/web/static/src/xml/notification.xml index 03ff4cd637b..42aab39f889 100644 --- a/addons/web/static/src/xml/notification.xml +++ b/addons/web/static/src/xml/notification.xml @@ -5,7 +5,7 @@
-
b
", "should display notification"); - assert.containsNone($notification, '.o_notification_close', "should not display the close button in "); + assert.containsOnce($notification, '.o_notification_close'); await waitCloseNotification(); assert.strictEqual($notification.is(':hidden'), true, "should hide the notification"); assert.strictEqual($('body .o_notification_manager .o_notification').length, 0, "should destroy the notification"); @@ -80,7 +80,7 @@ QUnit.module('Services', { await testUtils.nextMicrotaskTick(); var $notification = $('body .o_notification_manager .o_notification'); assert.strictEqual($notification.html().trim().replace(/\s+/g, ' '), - "
a
b
", + "
a
b
", "should display notification"); view.destroy(); });