diff options
| author | Romeo Fragomeli <rfr@odoo.com> | 2020-03-05 13:44:24 +0000 |
|---|---|---|
| committer | Adrien Dieudonne <adr@odoo.com> | 2020-03-11 10:10:16 +0000 |
| commit | ab2e3fdb7d801f8846b84733a47127e818a49d5b (patch) | |
| tree | 27ad68a03a0c57a571902ba4e1bfd114bbf836a8 /odoo/addons/test_main_flows | |
| parent | edf4f5c781fa75ad1506912c4494006caddcaa4e (diff) | |
[REF] *: add tour steps utils
This commit moves some step utils in a dedicated file and add new ones.
These steps will be very useful for the Main Flow Tour to avoid
duplicated code.
To do this, we also had to transform it into functions to allow
utils to call each other. Existing one are converted for
standardization purpose.
Note that 'WEBSITE_NEW_PAGE' wasn't considered as an util.
This is a very simple step only used twice.
Diffstat (limited to 'odoo/addons/test_main_flows')
| -rw-r--r-- | odoo/addons/test_main_flows/static/tests/tours/main_flow.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/odoo/addons/test_main_flows/static/tests/tours/main_flow.js b/odoo/addons/test_main_flows/static/tests/tours/main_flow.js index 6930eee21f9..0152cb7c05b 100644 --- a/odoo/addons/test_main_flows/static/tests/tours/main_flow.js +++ b/odoo/addons/test_main_flows/static/tests/tours/main_flow.js @@ -7,7 +7,7 @@ const tour = require('web_tour.tour'); tour.register('main_flow_tour', { test: true, url: "/web", -}, [tour.STEPS.SHOW_APPS_MENU_ITEM, { +}, [tour.stepUtils.showAppsMenuItem(), { trigger: '.o_app[data-menu-xmlid="sale.sale_menu_root"]', content: _t('Organize your sales activities with the <b>Sales app</b>.'), position: 'right', @@ -276,7 +276,7 @@ tour.register('main_flow_tour', { trigger: '.o_menu_toggle', content: _t('Go back to the home menu'), position: 'bottom', -}, tour.STEPS.SHOW_APPS_MENU_ITEM, { +}, tour.stepUtils.showAppsMenuItem(), { trigger: '.o_app[data-menu-xmlid="crm.crm_menu_root"]', content: _t('Organize your sales activities with the <b>CRM app</b>.'), position: 'right', @@ -424,7 +424,7 @@ tour.register('main_flow_tour', { trigger: '.o_menu_toggle', content: _t('Go back to the home menu'), position: 'bottom', -}, tour.STEPS.SHOW_APPS_MENU_ITEM, { +}, tour.stepUtils.showAppsMenuItem(), { trigger: '.o_app[data-menu-xmlid="stock.menu_stock_root"]', content: _t('Go to Inventory'), position: 'right', @@ -488,7 +488,7 @@ tour.register('main_flow_tour', { trigger: '.o_menu_toggle', content: _t('Go back to the home menu'), position: 'bottom', -}, tour.STEPS.SHOW_APPS_MENU_ITEM, { +}, tour.stepUtils.showAppsMenuItem(), { trigger: '.o_app[data-menu-xmlid="purchase.menu_purchase_root"]', content: _t('Go to Purchase'), position: 'right', @@ -544,7 +544,7 @@ tour.register('main_flow_tour', { trigger: '.o_menu_toggle', content: _t('Go back to the home menu'), position: 'bottom', -}, tour.STEPS.SHOW_APPS_MENU_ITEM, { +}, tour.stepUtils.showAppsMenuItem(), { trigger: '.o_app[data-menu-xmlid="mrp.menu_mrp_root"]', content: _t('Go to Manufacturing'), position: 'right', @@ -587,7 +587,7 @@ tour.register('main_flow_tour', { trigger: '.o_menu_toggle', content: _t('Go back to the home menu'), position: 'bottom', -}, tour.STEPS.SHOW_APPS_MENU_ITEM, { +}, tour.stepUtils.showAppsMenuItem(), { trigger: '.o_app[data-menu-xmlid="sale.sale_menu_root"]', content: _t('Organize your sales activities with the <b>Sales app</b>.'), position: 'bottom', |
