summaryrefslogtreecommitdiff
path: root/addons/mass_mailing/data
diff options
context:
space:
mode:
authorRobot Odoo <xmo+roboto@odoo.com>2019-06-05 09:42:45 +0200
committerGitHub <noreply@github.com>2019-06-05 09:42:45 +0200
commitd6847bacb1d2425466003985f9e96837f22c2148 (patch)
tree9b3cd47c66816d2f00a9fd937a5c1b6b2ad3e401 /addons/mass_mailing/data
parent2fab076e84ef72fa3482af227e432e6f3885e9a1 (diff)
parent7a3046a38f9c8ca8fc1c2bf7fcf28c46a0a51bde (diff)
[IMP] web, http, http_routing, *: new asset for test files
Coming with https://github.com/odoo/enterprise/pull/4281 This commit goal is to encapsulate every tour-test into a separate assets bundle that would be called only during tests (command line) or by URL (debug=tests). That way, a lot of .js files would not be loaded anymore uselessly outside test mode and will speed up the page loads (especially in the frontend as the backend do not reload the page anyway). In order to do that, we needed to propagate the `debug` state from page to page. Otherwise, every page change during a test would simply lose the debug mode and the test would stop as the test assets would not be loaded. As we could not add the `&debug=tests` on every link (either hardcoded or preprocess during the rendering), it has been decided to store it in session. Technical summary: 1. `debug` state (currently only stored in URL) will be stored in session. Either when adding the `debug` param in URL (handled with _dispatch) or by starting Odoo with `test-enable` or `test-file` (handled by session init). 2. Once activated (and so set in session), debug mode will be remain activated even if not visible in URL (after a page navigation eg). To remove it, set its value to nothing, `debug=`. That will exit debug mode (whatever mode it is: debug, assets, tests). 3. As tour-test files are now in a separate bundle, every layout (when needed) should `t-call="web.compiled_assets_tests"`. As it would be redundant and verbose, no `t-if` is needed on the t-call to load it only in test debug mode. That will be handled by `compiled_assets_tests` that will actually do the conditionnal t-call-assets to web.assets_tests, if tests debug mode is activated. 4. In addition to separating the tour-tests files in a separate bundle, we also moved those files to a specific folder under /static/tests/tours next to QUnit tests. 5. Also, tour files will be moved in a specific folder /static/src/js/tours for cleanness purpose (those files will still be kept in their 'normal' assets as needed outside test mode since it is tours). closes odoo/odoo#33213 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Diffstat (limited to 'addons/mass_mailing/data')
0 files changed, 0 insertions, 0 deletions