diff --git a/addons/stock/static/tests/tours/stock_report_tests.js b/addons/stock/static/tests/tours/stock_report_tests.js new file mode 100644 index 00000000000..c757390fa51 --- /dev/null +++ b/addons/stock/static/tests/tours/stock_report_tests.js @@ -0,0 +1,23 @@ +odoo.define('stock.reports.setup.tour', function (require) { + "use strict"; + + const tour = require('web_tour.tour'); + + tour.register('test_stock_route_diagram_report', { + test: true, + }, [ + { + trigger: '.o_kanban_record', + extra_trigger:'.breadcrumb', + }, + { + trigger: '.nav-item > a:contains("Inventory")', + }, + { + trigger: '.btn[id="stock.view_diagram_button"]', + }, + { + trigger: 'iframe .o_report_stock_rule', + }, + ]); +}); diff --git a/addons/stock/tests/__init__.py b/addons/stock/tests/__init__.py index 6cd4cf7805c..d94033cd6b6 100644 --- a/addons/stock/tests/__init__.py +++ b/addons/stock/tests/__init__.py @@ -17,3 +17,4 @@ from . import test_packing_neg from . import test_proc_rule from . import test_wise_operator from . import test_report +from . import test_report_tours diff --git a/addons/stock/tests/test_report_tours.py b/addons/stock/tests/test_report_tours.py new file mode 100644 index 00000000000..0958ed55c26 --- /dev/null +++ b/addons/stock/tests/test_report_tours.py @@ -0,0 +1,19 @@ +# Part of Odoo. See LICENSE file for full copyright and licensing details. +import odoo +from odoo.tests import Form, HttpCase, tagged + + +@tagged('-at_install', 'post_install') +class TestStockReportTour(HttpCase): + def setUp(self): + super().setUp() + + def _get_report_url(self): + return '/web#&model=product.template&action=stock.product_template_action_product' + + + def test_stock_route_diagram_report(self): + """ Open the route diagram report.""" + url = self._get_report_url() + + self.start_tour(url, 'test_stock_route_diagram_report', login='admin', timeout=180) diff --git a/addons/stock/views/product_views.xml b/addons/stock/views/product_views.xml index 9de6159e0a0..6dce4b0eb6f 100644 --- a/addons/stock/views/product_views.xml +++ b/addons/stock/views/product_views.xml @@ -111,7 +111,7 @@