[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:
Lucas Perais (lpe)
2022-02-02 09:03:35 +00:00
committed by luvi
parent 2473b9091a
commit 60643090d3
+3
View File
@@ -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()]