]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Automatically use correct chromedriver version 31371/head
authorTiago Melo <tmelo@suse.com>
Mon, 4 Nov 2019 11:27:46 +0000 (10:27 -0100)
committerNathan Cutler <ncutler@suse.com>
Mon, 4 Nov 2019 17:26:26 +0000 (18:26 +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>
(cherry picked from commit 242e76e8840b5d9085239a6fa55a29a093792ee3)

Conflicts:
src/pybind/mgr/dashboard/frontend/package.json
- use "e2e:dev" in nautilus, instead of "e2e:ci"

src/pybind/mgr/dashboard/frontend/package.json

index e5103272acb80b7c1ca159209c5ab5fb4c180ebf..6253b589079e779a59237185c305b41dd1ac0ea4 100644 (file)
@@ -11,8 +11,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:dev": "npm run env_build && ng e2e --dev-server-target",
+    "e2e": "npm run env_build && npm run e2e:update && ng e2e --webdriverUpdate=false",
+    "e2e:dev": "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",