test(fusion_accounting_reports): 5 OWL tour tests
Made-with: Cursor
This commit is contained in:
@@ -23,3 +23,4 @@ from . import test_xlsx_export
|
||||
from . import test_period_picker
|
||||
from . import test_migration_round_trip
|
||||
from . import test_coexistence
|
||||
from . import test_reports_tours
|
||||
|
||||
37
fusion_accounting_reports/tests/test_reports_tours.py
Normal file
37
fusion_accounting_reports/tests/test_reports_tours.py
Normal file
@@ -0,0 +1,37 @@
|
||||
"""Python wrappers that run the OWL tours via HttpCase.start_tour.
|
||||
|
||||
Tours require an HTTP server + headless browser. They are tagged with
|
||||
'tour' so they can be excluded from fast unit-test runs and selected
|
||||
explicitly when CI has the right infra (chromium + xvfb).
|
||||
|
||||
If `websocket-client` is not installed in the Python environment the
|
||||
HttpCase.start_tour() will raise; tests in this file therefore degrade
|
||||
gracefully (skipped) when the dependency is absent.
|
||||
"""
|
||||
|
||||
from odoo.tests.common import HttpCase, tagged
|
||||
|
||||
|
||||
@tagged('post_install', '-at_install', 'tour')
|
||||
class TestReportsTours(HttpCase):
|
||||
|
||||
def _start_tour_safe(self, url, tour_name):
|
||||
try:
|
||||
self.start_tour(url, tour_name, login="admin")
|
||||
except (ImportError, ModuleNotFoundError) as e:
|
||||
self.skipTest(f"Tour infra not available: {e}")
|
||||
|
||||
def test_smoke_tour(self):
|
||||
self._start_tour_safe("/odoo", "fusion_reports_smoke")
|
||||
|
||||
def test_period_picker_tour(self):
|
||||
self._start_tour_safe("/odoo", "fusion_reports_period_picker")
|
||||
|
||||
def test_xlsx_wizard_tour(self):
|
||||
self._start_tour_safe("/odoo", "fusion_reports_xlsx_wizard")
|
||||
|
||||
def test_anomaly_list_tour(self):
|
||||
self._start_tour_safe("/odoo", "fusion_reports_anomaly_list")
|
||||
|
||||
def test_viewer_smoke_tour(self):
|
||||
self._start_tour_safe("/odoo", "fusion_reports_viewer_smoke")
|
||||
Reference in New Issue
Block a user