From 60643090d35075f862ccceb601a3a0109420bcde Mon Sep 17 00:00:00 2001 From: "Lucas Perais (lpe)" Date: Fri, 28 Jan 2022 15:27:56 +0000 Subject: [PATCH] [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) --- odoo/tests/common.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/odoo/tests/common.py b/odoo/tests/common.py index aa647233dce..07f089906c5 100644 --- a/odoo/tests/common.py +++ b/odoo/tests/common.py @@ -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()]