[IMP] tests: support of touch feature detection for test suite
This commit brings the ability to use some feature detection mechanism used in Odoo. The jquery.touchSwipe library implementation requires the browser to get ontouch* events from the window to be available to assert that the browser has touch. The switch will make the mechanism to work as expected, and allow tests to use touch events while being correctly executed because the library expects such events. closes odoo/odoo#83588 Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
This commit is contained in:
@@ -976,6 +976,9 @@ class ChromeBrowser:
|
||||
'--remote-debugging-port': '0',
|
||||
'--no-sandbox': '',
|
||||
'--disable-gpu': '',
|
||||
# required for tests that depends on the jquery.touchSwipe library, which detects
|
||||
# touch capabilities using "'ontouchstart' in window"
|
||||
'--touch-events':'',
|
||||
}
|
||||
cmd = [self.executable]
|
||||
cmd += ['%s=%s' % (k, v) if v else k for k, v in switches.items()]
|
||||
|
||||
Reference in New Issue
Block a user