diff options
| author | qsm-odoo <qsm@odoo.com> | 2018-11-22 15:47:49 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2018-11-28 15:00:42 +0000 |
| commit | 4f3635b2b1126ef65025d4044eb2dab34ea50f2e (patch) | |
| tree | dc825c5cbcffbd484edc241a1ef0fbf0147f389d /addons/web/static/tests/helpers/test_utils_mock.js | |
| parent | c432667fbf2f9b833d7fde9010f558d19666ad2f (diff) | |
[IMP] website, *: add event handler possibilities
* web
This commit introduces helpers for async handlers, especially for button
clicks. Those helpers are now used automatically for website widgets
(animations) if the 'async' word is placed in front of a handler name
in the `events` key definition.
Diffstat (limited to 'addons/web/static/tests/helpers/test_utils_mock.js')
| -rw-r--r-- | addons/web/static/tests/helpers/test_utils_mock.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/addons/web/static/tests/helpers/test_utils_mock.js b/addons/web/static/tests/helpers/test_utils_mock.js index 769c179472a..3eaaae0a46f 100644 --- a/addons/web/static/tests/helpers/test_utils_mock.js +++ b/addons/web/static/tests/helpers/test_utils_mock.js @@ -13,6 +13,7 @@ odoo.define('web.test_utils_mock', function (require) { var basic_fields = require('web.basic_fields'); var config = require('web.config'); var core = require('web.core'); +var dom = require('web.dom'); var MockServer = require('web.MockServer'); var session = require('web.session'); @@ -154,6 +155,8 @@ function addMockEnvironment(widget, params) { // make sure the debounce value for input fields is set to 0 var initialDebounceValue = DebouncedField.prototype.DEBOUNCE; DebouncedField.prototype.DEBOUNCE = params.fieldDebounce || 0; + var initialDOMDebounceValue = dom.DEBOUNCE; + dom.DEBOUNCE = 0; var initialSession, initialConfig, initialParameters, initialDebounce, initialThrottle; initialSession = _.extend({}, session); session.getTZOffset = function () { @@ -196,6 +199,7 @@ function addMockEnvironment(widget, params) { core.bus.trigger('clear_cache'); DebouncedField.prototype.DEBOUNCE = initialDebounceValue; + dom.DEBOUNCE = initialDOMDebounceValue; if (params.debounce === false) { _.debounce = initialDebounce; } |
