From a7ef1521408eb64baefdb9f276cda18c6318a63c Mon Sep 17 00:00:00 2001 From: lana-k Date: Sat, 24 Apr 2021 16:52:15 +0200 Subject: [PATCH] Enable touch events in headless Firefox --- karma.conf.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/karma.conf.js b/karma.conf.js index 096976c..35be504 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -76,9 +76,17 @@ module.exports = function (config) { // enable / disable watching file and executing tests whenever any file changes autoWatch: false, + customLaunchers: { + FirefoxHeadlessTouch: { + base: 'FirefoxHeadless', + prefs: { + 'dom.w3c_touch_events.enabled': 1 + } + } + }, // start these browsers // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher - browsers: ['ChromiumHeadless', 'FirefoxHeadless'], + browsers: ['ChromiumHeadless', 'FirefoxHeadlessTouch'], // Continuous Integration mode // if true, Karma captures browsers, runs the tests and exits