[FIX] web,mail,web_tour,test_main_flows,tests: no hardcoded user agent
Main Flow Tour Mobile shouldn't require a specific `user_agent` as it targets a small screen and not a mobile platform (iOS, Android...). Actually, during refactoring of the tours (odoo/odoo@3a798039d6), a confusion was made between the legacy `isMobile`, which represents a small screen (cf. `env.isSmall`) and `isMobileOS`, which targets "mobile" platforms (ie. iOS, Android...) independently of the screen size. This commit applies the proper condition (isSmall) for the tours management and removes the useless `user_agent` property. It also removes the logic added to support custom user_agent in the Chrome automation for testing. closes odoo/odoo#116186 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit is contained in:
@@ -835,7 +835,6 @@ class ChromeBrowser:
|
||||
|
||||
self.window_size = test_class.browser_size
|
||||
self.touch_enabled = test_class.touch_enabled
|
||||
self.user_agent = test_class.user_agent
|
||||
self.sigxcpu_handler = None
|
||||
self._chrome_start()
|
||||
self._find_websocket()
|
||||
@@ -985,9 +984,6 @@ class ChromeBrowser:
|
||||
# "'ontouchstart' in window"
|
||||
switches['--touch-events'] = ''
|
||||
|
||||
if self.user_agent:
|
||||
switches['--user-agent'] = self.user_agent
|
||||
|
||||
cmd = [self.executable]
|
||||
cmd += ['%s=%s' % (k, v) if v else k for k, v in switches.items()]
|
||||
url = 'about:blank'
|
||||
@@ -1554,7 +1550,6 @@ class HttpCase(TransactionCase):
|
||||
browser_size = '1366x768'
|
||||
touch_enabled = False
|
||||
allow_end_on_form = False
|
||||
user_agent = None
|
||||
|
||||
_logger: logging.Logger = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user