From e1f94d5202f8d766ce25d38dda2785e24a1aad3c Mon Sep 17 00:00:00 2001 From: gsinghpal Date: Sun, 19 Apr 2026 21:39:08 -0400 Subject: [PATCH] test(fusion_accounting_followup): 5 OWL tour tests Made-with: Cursor --- fusion_accounting_followup/__manifest__.py | 5 +- .../static/src/tours/followup_tours.js | 50 +++++++++++++++++++ fusion_accounting_followup/tests/__init__.py | 1 + .../tests/test_followup_tours.py | 23 +++++++++ 4 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 fusion_accounting_followup/static/src/tours/followup_tours.js create mode 100644 fusion_accounting_followup/tests/test_followup_tours.py diff --git a/fusion_accounting_followup/__manifest__.py b/fusion_accounting_followup/__manifest__.py index efa2525d..dfb505bf 100644 --- a/fusion_accounting_followup/__manifest__.py +++ b/fusion_accounting_followup/__manifest__.py @@ -1,6 +1,6 @@ { 'name': 'Fusion Accounting Follow-up', - 'version': '19.0.1.0.28', + 'version': '19.0.1.0.29', 'category': 'Accounting/Accounting', 'summary': 'AI-augmented customer follow-ups (dunning) for unpaid invoices.', 'description': """ @@ -60,6 +60,9 @@ menu hides; the engine + AI tools remain available for the chat. 'fusion_accounting_followup/static/src/components/followup_history_table/followup_history_table.js', 'fusion_accounting_followup/static/src/components/followup_history_table/followup_history_table.xml', ], + 'web.assets_tests': [ + 'fusion_accounting_followup/static/src/tours/followup_tours.js', + ], }, 'installable': True, 'auto_install': False, diff --git a/fusion_accounting_followup/static/src/tours/followup_tours.js b/fusion_accounting_followup/static/src/tours/followup_tours.js new file mode 100644 index 00000000..35c7617f --- /dev/null +++ b/fusion_accounting_followup/static/src/tours/followup_tours.js @@ -0,0 +1,50 @@ +/** @odoo-module **/ + +import { registry } from "@web/core/registry"; + +// Tour 1: smoke +registry.category("web_tour.tours").add("fusion_followup_smoke", { + test: true, + url: "/odoo", + steps: () => [ + { content: "Wait for app", trigger: ".o_navbar" }, + ], +}); + +// Tour 2: open partners list +registry.category("web_tour.tours").add("fusion_followup_partners", { + test: true, + url: "/odoo/action-fusion_accounting_followup.action_fusion_followup_partners", + steps: () => [ + { content: "List view loads", trigger: ".o_list_view, .o_view_nocontent" }, + ], +}); + +// Tour 3: open levels +registry.category("web_tour.tours").add("fusion_followup_levels", { + test: true, + url: "/odoo/action-fusion_accounting_followup.action_fusion_followup_levels", + steps: () => [ + { content: "Levels view loads", trigger: ".o_list_view, .o_view_nocontent" }, + ], +}); + +// Tour 4: history +registry.category("web_tour.tours").add("fusion_followup_history", { + test: true, + url: "/odoo/action-fusion_accounting_followup.action_fusion_followup_runs", + steps: () => [ + { content: "History view loads", trigger: ".o_list_view, .o_view_nocontent" }, + ], +}); + +// Tour 5: batch wizard +registry.category("web_tour.tours").add("fusion_followup_batch_wizard", { + test: true, + url: "/odoo/action-fusion_accounting_followup.action_fusion_batch_followup_wizard", + steps: () => [ + { content: "Wizard form opens", trigger: ".modal-dialog .o_form_view" }, + { content: "Scope field exists", trigger: ".modal-dialog [name='scope']" }, + { content: "Close wizard", trigger: ".modal-dialog .btn-secondary", run: "click" }, + ], +}); diff --git a/fusion_accounting_followup/tests/__init__.py b/fusion_accounting_followup/tests/__init__.py index e78d0895..cc9e8340 100644 --- a/fusion_accounting_followup/tests/__init__.py +++ b/fusion_accounting_followup/tests/__init__.py @@ -20,3 +20,4 @@ from . import test_performance_benchmarks from . import test_batch_followup_wizard from . import test_migration_round_trip from . import test_coexistence +from . import test_followup_tours diff --git a/fusion_accounting_followup/tests/test_followup_tours.py b/fusion_accounting_followup/tests/test_followup_tours.py new file mode 100644 index 00000000..f3eec133 --- /dev/null +++ b/fusion_accounting_followup/tests/test_followup_tours.py @@ -0,0 +1,23 @@ +"""Python wrappers for OWL tours via HttpCase.start_tour.""" + +from odoo.tests.common import HttpCase +from odoo.tests import tagged + + +@tagged('post_install', '-at_install', 'tour') +class TestFollowupTours(HttpCase): + + def test_smoke_tour(self): + self.start_tour("/odoo", "fusion_followup_smoke", login="admin") + + def test_partners_tour(self): + self.start_tour("/odoo", "fusion_followup_partners", login="admin") + + def test_levels_tour(self): + self.start_tour("/odoo", "fusion_followup_levels", login="admin") + + def test_history_tour(self): + self.start_tour("/odoo", "fusion_followup_history", login="admin") + + def test_batch_wizard_tour(self): + self.start_tour("/odoo", "fusion_followup_batch_wizard", login="admin")