]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/dashboard: Automatically use correct chromedriver version
authorTiago Melo <tmelo@suse.com>
Mon, 4 Nov 2019 11:27:46 +0000 (10:27 -0100)
committerTiago Melo <tmelo@suse.com>
Mon, 4 Nov 2019 11:47:43 +0000 (10:47 -0100)
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 <almartin@redhat.com>
Signed-off-by: Tiago Melo <tmelo@suse.com>
src/pybind/mgr/dashboard/frontend/package.json

index 6a622baec4fa87a308069ebb4a438a9b1d9ec9da..6560a25c7f30a297356eb6ebeaff917368028d16 100644 (file)
@@ -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",