summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/env
diff options
context:
space:
mode:
authorAlexandre Kühn <aku@odoo.com>2020-09-16 11:04:15 +0000
committerAlexandre Kühn <aku@odoo.com>2020-09-16 15:04:14 +0000
commitf0d97c5d00a1afdd74201688c7e22e97ffaf47f9 (patch)
tree60b9653b105ebf1edc923f124910c4ec9b3ba63d /addons/mail/static/src/env
parent7a1308b426f94b33e2bd55e5d58e661067e26ff3 (diff)
[FIX] mail: do not fetch attachment style in QUnit tests
Task-2339931 closes odoo/odoo#57869 X-original-commit: 7586f7756859bb0711eee8a82bf728a039ad0d72 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Diffstat (limited to 'addons/mail/static/src/env')
-rw-r--r--addons/mail/static/src/env/test_env.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/addons/mail/static/src/env/test_env.js b/addons/mail/static/src/env/test_env.js
index fb16caaaf5e..048bfc8d65f 100644
--- a/addons/mail/static/src/env/test_env.js
+++ b/addons/mail/static/src/env/test_env.js
@@ -56,6 +56,13 @@ function addMessagingToEnv(providedEnv = {}) {
}
return this.messaging.isInitialized;
},
+ /**
+ * States whether the environment is in QUnit test or not.
+ *
+ * Useful to prevent some behaviour in QUnit tests, like applying
+ * style of attachment that uses url.
+ */
+ isQUnitTest: true,
loadingBaseDelayDuration: providedEnv.loadingBaseDelayDuration || 0,
messaging: undefined,
messagingCreatedPromise: makeDeferred(),