Files
odoo_source/addons/website/tests/test_client_action.py
T
Romain Derie 7f1653a1de [IMP] website: remove the iframefallback in test mode
This commit gets rid of the iframefallback in test mode. It is not
helpful there and slows down the tests as it involves some HTTP
requests.
Its purpose is only for the end users to have a smoother UX during page
transition. It is irrelevant in tests. Note that it means the tests
wouldn't break if that iframe fallback was to be breaking something in
real use cases.

task-2687506

closes odoo/odoo#96229

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-08-08 10:50:56 +02:00

28 lines
1.0 KiB
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import odoo.tests
@odoo.tests.common.tagged('post_install', '-at_install')
class TestClientAction(odoo.tests.HttpCase):
def test_01_client_action_redirect(self):
page = self.env['website.page'].create({
'name': 'Base',
'type': 'qweb',
'arch': """
<t t-call="website.layout">
<a id="test_contact_BE" href="/@/contactus?enable_editor=1">Contact</a>
<a id="test_contact_FE" href="/contactus?enable_editor=1">Contact</a>
</t>
""",
'key': 'website.test_client_action_redirect',
'url': '/test_client_action_redirect',
'is_published': True,
})
self.start_tour(page.url, 'client_action_redirect', login='admin')
def test_02_client_action_iframe_fallback(self):
self.start_tour('/@/', 'client_action_iframe_fallback', login='admin')