summaryrefslogtreecommitdiff
path: root/addons/mail/static/tests
diff options
context:
space:
mode:
authorAlexandre Kühn <aku@odoo.com>2018-08-30 16:10:20 +0200
committerAlexandre Kühn <aku@odoo.com>2018-08-30 17:55:18 +0200
commitf80bbb4b2a1230ba543e97d3da01c7b2c52d24cc (patch)
tree34d27fbdab943be7a2ebd675095060bb6ea512b5 /addons/mail/static/tests
parentf8e3aed20ba073294fa1453f86709d6cbce650f5 (diff)
[IMP] mail, mail_bot: improved push notifications permission response
This commit makes small improvements on the messaging menu with the new module `mail_bot`: [IMP] When OdooBot has a request, it now adds "+1" to the counter of the messaging menu. The related preview also has a bold title, and displays "(1)" next to the title. [REF] Static previews are no longer in mail_service. This was only used for "OdooBot has a request" preview. This logic has now been moved to the module `mail_bot` (was previously in `mail`). [FIX] Title of response of push notifications permission clearly states whether permission has been granted or denied (was displaying "[Object object]" before this commit). Task-ID 1877502
Diffstat (limited to 'addons/mail/static/tests')
-rw-r--r--addons/mail/static/tests/document_thread_window_tests.js5
-rw-r--r--addons/mail/static/tests/systray/systray_messaging_menu_mail_failure_tests.js3
-rw-r--r--addons/mail/static/tests/systray/systray_messaging_menu_tests.js3
3 files changed, 0 insertions, 11 deletions
diff --git a/addons/mail/static/tests/document_thread_window_tests.js b/addons/mail/static/tests/document_thread_window_tests.js
index a14b2ebc159..d7064b8695d 100644
--- a/addons/mail/static/tests/document_thread_window_tests.js
+++ b/addons/mail/static/tests/document_thread_window_tests.js
@@ -84,12 +84,7 @@ QUnit.module('Document Thread', {
partner_id: partnerID, // so that needaction messages are treated as needactions
};
this.services = mailTestUtils.getMailServices();
- this.MailService = this.services.mail_service;
- this.MailService.prototype.IS_STATIC_PREVIEW_ENABLED = false;
},
- afterEach: function () {
- this.MailService.prototype.IS_STATIC_PREVIEW_ENABLED = true;
- }
});
QUnit.test('open a document thread in a thread window', function (assert) {
diff --git a/addons/mail/static/tests/systray/systray_messaging_menu_mail_failure_tests.js b/addons/mail/static/tests/systray/systray_messaging_menu_mail_failure_tests.js
index 0ef6679c675..c1fc1bd8dae 100644
--- a/addons/mail/static/tests/systray/systray_messaging_menu_mail_failure_tests.js
+++ b/addons/mail/static/tests/systray/systray_messaging_menu_mail_failure_tests.js
@@ -58,11 +58,8 @@ QUnit.module('MessagingMenu (Mail Failures)', {
};
this.services = mailTestUtils.getMailServices();
- this.MailService = this.services.mail_service;
- this.MailService.prototype.IS_STATIC_PREVIEW_ENABLED = false;
},
afterEach: function () {
- this.MailService.prototype.IS_STATIC_PREVIEW_ENABLED = true;
// unpatch _.debounce and _.throttle
_.debounce = this.underscoreDebounce;
_.throttle = this.underscoreThrottle;
diff --git a/addons/mail/static/tests/systray/systray_messaging_menu_tests.js b/addons/mail/static/tests/systray/systray_messaging_menu_tests.js
index 16458550406..ca0c889039b 100644
--- a/addons/mail/static/tests/systray/systray_messaging_menu_tests.js
+++ b/addons/mail/static/tests/systray/systray_messaging_menu_tests.js
@@ -93,11 +93,8 @@ QUnit.module('MessagingMenu', {
},
};
this.services = mailTestUtils.getMailServices();
- this.MailService = this.services.mail_service;
- this.MailService.prototype.IS_STATIC_PREVIEW_ENABLED = false;
},
afterEach: function () {
- this.MailService.prototype.IS_STATIC_PREVIEW_ENABLED = true;
// unpatch _.debounce and _.throttle
_.debounce = this.underscoreDebounce;
_.throttle = this.underscoreThrottle;