]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: E2E: Disable GPU for Chrome Headless
authorTiago Melo <tmelo@suse.com>
Mon, 20 Jul 2020 10:47:08 +0000 (10:47 +0000)
committerTiago Melo <tmelo@suse.com>
Mon, 20 Jul 2020 16:41:50 +0000 (16:41 +0000)
Fixes: https://tracker.ceph.com/issues/46624
Signed-off-by: Tiago Melo <tmelo@suse.com>
src/pybind/mgr/dashboard/frontend/cypress.json
src/pybind/mgr/dashboard/frontend/cypress/plugins/index.js [new file with mode: 0644]
src/pybind/mgr/dashboard/frontend/cypress/tsconfig.json

index cef1e3382d3cb98a54e1725aeeeaddb633334818..669f9007f9c3d3afe6a7b77b2514b08e95b28122 100644 (file)
@@ -8,6 +8,5 @@
   "defaultCommandTimeout": 20000,
   "viewportHeight": 1080,
   "viewportWidth": 1920,
-  "pluginsFile": false,
   "projectId": "k7ab29"
 }
diff --git a/src/pybind/mgr/dashboard/frontend/cypress/plugins/index.js b/src/pybind/mgr/dashboard/frontend/cypress/plugins/index.js
new file mode 100644 (file)
index 0000000..0f9934c
--- /dev/null
@@ -0,0 +1,8 @@
+module.exports = (on, _config) => {
+  on('before:browser:launch', (browser, launchOptions) => {
+    if (browser.name === 'chrome' && browser.isHeadless) {
+      launchOptions.args.push('--disable-gpu');
+      return launchOptions;
+    }
+  });
+};
index 681a8b35dd7dd0ea9f2fa5e5a6643676529370a8..8b5a7ffc9c6d06244fc528c71301ff7d8e55cfa7 100644 (file)
@@ -2,7 +2,8 @@
   "extends": "../tsconfig.json",
   "exclude": [],
   "include": [
-    "**/*.ts"
+    "**/*.ts",
+    "plugins/index.js"
   ],
   "compilerOptions": {
     "types": [