From 40896233cc1f234d19f239e06daef80ca635ac12 Mon Sep 17 00:00:00 2001 From: Tiago Melo Date: Mon, 20 Jul 2020 10:47:08 +0000 Subject: [PATCH] mgr/dashboard: E2E: Disable GPU for Chrome Headless Fixes: https://tracker.ceph.com/issues/46624 Signed-off-by: Tiago Melo --- src/pybind/mgr/dashboard/frontend/cypress.json | 1 - .../mgr/dashboard/frontend/cypress/plugins/index.js | 8 ++++++++ src/pybind/mgr/dashboard/frontend/cypress/tsconfig.json | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 src/pybind/mgr/dashboard/frontend/cypress/plugins/index.js diff --git a/src/pybind/mgr/dashboard/frontend/cypress.json b/src/pybind/mgr/dashboard/frontend/cypress.json index cef1e3382d3..669f9007f9c 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress.json +++ b/src/pybind/mgr/dashboard/frontend/cypress.json @@ -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 index 00000000000..0f9934c9897 --- /dev/null +++ b/src/pybind/mgr/dashboard/frontend/cypress/plugins/index.js @@ -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; + } + }); +}; diff --git a/src/pybind/mgr/dashboard/frontend/cypress/tsconfig.json b/src/pybind/mgr/dashboard/frontend/cypress/tsconfig.json index 681a8b35dd7..8b5a7ffc9c6 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/tsconfig.json +++ b/src/pybind/mgr/dashboard/frontend/cypress/tsconfig.json @@ -2,7 +2,8 @@ "extends": "../tsconfig.json", "exclude": [], "include": [ - "**/*.ts" + "**/*.ts", + "plugins/index.js" ], "compilerOptions": { "types": [ -- 2.47.3