Initial commit: Odoo 18.0-20251222 extra-addons
This commit is contained in:
2
web_quick_start_screen/tests/__init__.py
Executable file
2
web_quick_start_screen/tests/__init__.py
Executable file
@@ -0,0 +1,2 @@
|
||||
from . import test_web_quick_start_screen
|
||||
from .test_web_quick_start_screen import TestQuickStartActionsCommon
|
||||
26
web_quick_start_screen/tests/test_web_quick_start_screen.py
Executable file
26
web_quick_start_screen/tests/test_web_quick_start_screen.py
Executable file
@@ -0,0 +1,26 @@
|
||||
# Copyright 2024 Tecnativa - David Vidal
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
from odoo.tests import TransactionCase
|
||||
|
||||
|
||||
class TestQuickStartActionsCommon(TransactionCase):
|
||||
def _test_screen_action(self, screen_action):
|
||||
"""Basic test helper. For a more complete one we'd need a tour"""
|
||||
action = screen_action.run_action()
|
||||
if action["type"] == "ir.actions.server":
|
||||
action = (
|
||||
self.env.ref(action["xml_id"])
|
||||
.with_context(**screen_action._get_extra_context())
|
||||
.run()
|
||||
)
|
||||
return action
|
||||
|
||||
|
||||
class TestQuickStartActions(TestQuickStartActionsCommon):
|
||||
def test_demo_screen_actions(self):
|
||||
"""Let's test every action screen in our demo data"""
|
||||
demo_start_screen = self.env.ref(
|
||||
"web_quick_start_screen.quick_start_screen_demo"
|
||||
)
|
||||
for action in demo_start_screen.action_ids:
|
||||
self._test_screen_action(action)
|
||||
Reference in New Issue
Block a user