From: Tiago Melo Date: Mon, 20 Jul 2020 10:47:08 +0000 (+0000) Subject: mgr/dashboard: E2E: Disable GPU for Chrome Headless X-Git-Tag: wip-pdonnell-testing-20200918.022351~601^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=40896233cc1f234d19f239e06daef80ca635ac12;p=ceph-ci.git mgr/dashboard: E2E: Disable GPU for Chrome Headless Fixes: https://tracker.ceph.com/issues/46624 Signed-off-by: Tiago Melo --- 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": [