From 242e76e8840b5d9085239a6fa55a29a093792ee3 Mon Sep 17 00:00:00 2001 From: Tiago Melo Date: Mon, 4 Nov 2019 10:27:46 -0100 Subject: [PATCH] mgr/dashboard: Automatically use correct chromedriver version MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Every Chrome version requires a corresponding chromedriver version for the e2e test to work. Since we were using a fixed chromedriver version, each time chrome was updated the e2e scripts stopped working. With this new script we will check which version of Chrome is installed and update chromedriver to the correct version. Fixes: https://tracker.ceph.com/issues/42607 Signed-off-by: Alfonso Martínez Signed-off-by: Tiago Melo --- src/pybind/mgr/dashboard/frontend/package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/package.json b/src/pybind/mgr/dashboard/frontend/package.json index 6a622baec4f..6560a25c7f3 100644 --- a/src/pybind/mgr/dashboard/frontend/package.json +++ b/src/pybind/mgr/dashboard/frontend/package.json @@ -32,8 +32,9 @@ "test": "npm run test:config && jest --watch", "test:ci": "npm run test:config && JEST_SILENT_REPORTER_DOTS=true jest --coverage --reporters jest-silent-reporter", "test:config": "if [ ! -e 'src/unit-test-configuration.ts' ]; then cp 'src/unit-test-configuration.ts.sample' 'src/unit-test-configuration.ts'; fi", - "e2e": "npm run env_build && ng e2e", - "e2e:ci": "npm run env_build && ng e2e --dev-server-target", + "e2e": "npm run env_build && npm run e2e:update && ng e2e --webdriverUpdate=false", + "e2e:ci": "npm run env_build && npm run e2e:update && ng e2e --dev-server-target --webdriverUpdate=false", + "e2e:update": "npx webdriver-manager update --gecko=false --versions.chrome=$(google-chrome --version | awk '{ print $3 }')", "lint:tslint": "ng lint", "lint:prettier": "prettier --list-different \"{src,e2e}/**/*.{ts,scss}\"", "lint:html": "html-linter --config html-linter.config.json", -- 2.39.5