diff options
| author | Romain Derie <rde@odoo.com> | 2019-06-03 14:26:05 +0000 |
|---|---|---|
| committer | Jeremy Kersten <jke@odoo.com> | 2019-06-05 05:56:33 +0000 |
| commit | fdbf11643fd04059bfbc2210427c428979fed73d (patch) | |
| tree | 56801140d47920d0582068323dd874c2ead687d5 /odoo/addons | |
| parent | d7cd97a9be63ae0a8643400b56d6f9a03285fba6 (diff) | |
[IMP] *: move test and tour files to new folder hierarchy and asset
As we now have a new debug mode 'tests' which load a new asset bundle
containing tour-test files, we moved those files to a new folder hierarchy.
That will clean the .js files trees.
Also, those files should be included in the new asset.
Basically, the .js tour files (not test) should be inside /static/src/js/tours
while .js tour test files (test=true) should be inside /static/tests/tours next
to QUnit tests, inside a tours folder.
+ test_new_api: don't run the test in debug assets
task-1934445
Comes with https://github.com/odoo/enterprise/pull/4281
Closes #33213
Diffstat (limited to 'odoo/addons')
| -rw-r--r-- | odoo/addons/test_main_flows/__manifest__.py | 2 | ||||
| -rw-r--r-- | odoo/addons/test_main_flows/static/tests/tours/main_flow.js (renamed from odoo/addons/test_main_flows/static/src/js/tour.js) | 0 | ||||
| -rw-r--r-- | odoo/addons/test_main_flows/views/assets.xml (renamed from odoo/addons/test_main_flows/views/templates.xml) | 4 | ||||
| -rw-r--r-- | odoo/addons/test_new_api/__manifest__.py | 2 | ||||
| -rw-r--r-- | odoo/addons/test_new_api/assets.xml | 9 | ||||
| -rw-r--r-- | odoo/addons/test_new_api/static/tests/tours/x2many.js (renamed from odoo/addons/test_new_api/static/tests/x2many.js) | 2 | ||||
| -rw-r--r-- | odoo/addons/test_new_api/template.xml | 9 |
7 files changed, 14 insertions, 14 deletions
diff --git a/odoo/addons/test_main_flows/__manifest__.py b/odoo/addons/test_main_flows/__manifest__.py index cc8feb4fa59..7dcb3a7457e 100644 --- a/odoo/addons/test_main_flows/__manifest__.py +++ b/odoo/addons/test_main_flows/__manifest__.py @@ -10,7 +10,7 @@ It will install some main apps and will try to execute the most important action """, 'depends': ['web_tour', 'crm', 'sale_timesheet', 'purchase_stock', 'mrp', 'account'], 'data': [ - 'views/templates.xml', + 'views/assets.xml', ], 'installable': True, 'post_init_hook': '_auto_install_enterprise_dependencies', diff --git a/odoo/addons/test_main_flows/static/src/js/tour.js b/odoo/addons/test_main_flows/static/tests/tours/main_flow.js index f13cfb64e44..f13cfb64e44 100644 --- a/odoo/addons/test_main_flows/static/src/js/tour.js +++ b/odoo/addons/test_main_flows/static/tests/tours/main_flow.js diff --git a/odoo/addons/test_main_flows/views/templates.xml b/odoo/addons/test_main_flows/views/assets.xml index 9c1bd81699f..c2691297179 100644 --- a/odoo/addons/test_main_flows/views/templates.xml +++ b/odoo/addons/test_main_flows/views/assets.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <odoo> - <template id="assets_backend" name="the flow assets" inherit_id="web.assets_backend"> + <template id="assets_tests" name="The Flow Assets Tests" inherit_id="web.assets_tests"> <xpath expr="." position="inside"> - <script type="text/javascript" src="/test_main_flows/static/src/js/tour.js"></script> + <script type="text/javascript" src="/test_main_flows/static/tests/tours/main_flow.js"></script> </xpath> </template> </odoo> diff --git a/odoo/addons/test_new_api/__manifest__.py b/odoo/addons/test_new_api/__manifest__.py index e238f37f779..cdbd5291879 100644 --- a/odoo/addons/test_new_api/__manifest__.py +++ b/odoo/addons/test_new_api/__manifest__.py @@ -11,6 +11,6 @@ 'ir.model.access.csv', 'views.xml', 'demo_data.xml', - 'template.xml', + 'assets.xml', ], } diff --git a/odoo/addons/test_new_api/assets.xml b/odoo/addons/test_new_api/assets.xml new file mode 100644 index 00000000000..8d0103a311d --- /dev/null +++ b/odoo/addons/test_new_api/assets.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <template id="assets_tests" name="Test New Api Assets Tests" inherit_id="web.assets_tests"> + <xpath expr="." position="inside"> + <script type="text/javascript" src="/test_new_api/static/tests/tours/x2many.js"></script> + </xpath> + </template> +</odoo> + diff --git a/odoo/addons/test_new_api/static/tests/x2many.js b/odoo/addons/test_new_api/static/tests/tours/x2many.js index 06a804fca9e..ae4c0e3c8d3 100644 --- a/odoo/addons/test_new_api/static/tests/x2many.js +++ b/odoo/addons/test_new_api/static/tests/tours/x2many.js @@ -5,7 +5,7 @@ odoo.define('web.test.x2many', function (require) { var inc; tour.register('widget_x2many', { - url: '/web?debug=assets#action=test_new_api.action_discussions', + url: '/web#action=test_new_api.action_discussions', test: true, }, [ ///////////////////////////////////////////////////////////////////////////////////////////// diff --git a/odoo/addons/test_new_api/template.xml b/odoo/addons/test_new_api/template.xml deleted file mode 100644 index f62d3d47f20..00000000000 --- a/odoo/addons/test_new_api/template.xml +++ /dev/null @@ -1,9 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<odoo> - <template id="assets_backend" name="test_new_api backend assets" inherit_id="web.assets_backend"> - <xpath expr="//script[last()]" position="after"> - <script type="text/javascript" src="/test_new_api/static/tests/x2many.js"></script> - </xpath> - </template> -</odoo> - |
