[IMP] test_themes: adapt to website_preview client action

This commit removes the tooltips shown when hovering over a theme in
the website switcher dropdown. This feature will be reimplemented later,
patching the WebsiteSwitcherSystray component.

It also adapts the ?fw= url parameter to force a website id during the
tours.

task-2687506

closes odoo/design-themes#572

Related: odoo/odoo#89223
Related: odoo/enterprise#28448
Related: odoo/upgrade#3464
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
Younn Olivier
2022-06-17 15:22:06 +00:00
committed by qsm-odoo
parent ab4f5e6178
commit 163a8b6fae
4 changed files with 35 additions and 32 deletions
+3 -3
View File
@@ -9,10 +9,10 @@ class Http(models.AbstractModel):
_inherit = 'ir.http'
@classmethod
def _frontend_pre_dispatch(cls):
def _pre_dispatch(cls, rule, args):
super()._pre_dispatch(rule, args)
# Allow public user to use `fw` query string in test mode to ease tests
force_website_id = request.httprequest.args.get('fw')
if (request.registry.in_test_mode() or tools.config.options['test_enable']) and force_website_id:
request.env['website']._force_website(force_website_id)
super(Http, cls)._frontend_pre_dispatch()