test(fusion_accounting_followup): 5 OWL tour tests

Made-with: Cursor
This commit is contained in:
gsinghpal
2026-04-19 21:39:08 -04:00
parent 8eb4b8dc6c
commit e1f94d5202
4 changed files with 78 additions and 1 deletions

View File

@@ -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,

View File

@@ -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" },
],
});

View File

@@ -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

View File

@@ -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")