From 9cd400b3872a40ef5ce1a6f73fadf17c42b8147c Mon Sep 17 00:00:00 2001 From: Tiago Melo Date: Tue, 10 Sep 2019 12:26:31 +0000 Subject: [PATCH] mgr/dashboard: Add protractor-fast-fail plugin Signed-off-by: Tiago Melo --- src/pybind/mgr/dashboard/frontend/.gitignore | 1 + .../mgr/dashboard/frontend/package-lock.json | 77 +++++++++++-------- .../mgr/dashboard/frontend/package.json | 1 + .../mgr/dashboard/frontend/protractor.conf.js | 9 ++- 4 files changed, 52 insertions(+), 36 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/.gitignore b/src/pybind/mgr/dashboard/frontend/.gitignore index abe4220067b..08ded325383 100644 --- a/src/pybind/mgr/dashboard/frontend/.gitignore +++ b/src/pybind/mgr/dashboard/frontend/.gitignore @@ -36,6 +36,7 @@ testem.log # e2e /e2e/*.js /e2e/*.map +.protractor-fail-fast # System Files .DS_Store diff --git a/src/pybind/mgr/dashboard/frontend/package-lock.json b/src/pybind/mgr/dashboard/frontend/package-lock.json index 7827a9e2c22..9f99d490f93 100644 --- a/src/pybind/mgr/dashboard/frontend/package-lock.json +++ b/src/pybind/mgr/dashboard/frontend/package-lock.json @@ -3742,8 +3742,7 @@ "camelcase": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" }, "caniuse-lite": { "version": "1.0.30000986", @@ -5817,10 +5816,6 @@ "integrity": "sha512-a7YT0SV3RB+DjYcppwVDLtn13UQnmg0SWZS7ezZD0UjnLwXmy8Zm21GMVGLaFGimIqcvyMQaOJBrop8MyOp1kQ==", "dev": true, "optional": true, - "requires": { - "nan": "^2.12.1", - "node-pre-gyp": "^0.12.0" - }, "dependencies": { "abbrev": { "version": "1.1.1", @@ -5937,7 +5932,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true, "optional": true }, "is-fullwidth-code-point": { @@ -5996,9 +5990,7 @@ "nan": { "version": "2.14.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", - "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", - "dev": true, - "optional": true + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==" }, "needle": { "version": "2.3.0", @@ -6011,8 +6003,6 @@ "node-pre-gyp": { "version": "0.12.0", "bundled": true, - "dev": true, - "optional": true, "requires": { "is-extglob": "^1.0.0" } @@ -7301,6 +7291,23 @@ "integrity": "sha512-HU/YxV4i6GcmiH4duATwAbJQMlE0MsDIR5XmSVxURxKHn3aGAdbY1/ZJFmVRbKtnLwIxxMJD7gYaPsypcbYimg==", "dev": true }, + "jasmine-fail-fast": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/jasmine-fail-fast/-/jasmine-fail-fast-2.0.0.tgz", + "integrity": "sha1-5dguaimiX2YsZA5MMnDC+acTh+c=", + "dev": true, + "requires": { + "lodash": "3.10.0" + }, + "dependencies": { + "lodash": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.0.tgz", + "integrity": "sha1-k9UcZygopEFqEq9XIguoqHN+L7s=", + "dev": true + } + } + }, "jasmine-spec-reporter": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/jasmine-spec-reporter/-/jasmine-spec-reporter-4.2.1.tgz", @@ -12278,6 +12285,15 @@ } } }, + "protractor-fail-fast": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/protractor-fail-fast/-/protractor-fail-fast-3.1.0.tgz", + "integrity": "sha512-OjuIFmY7hm5R/Msmioyg3aBevySpmpIgtm2TGUvMEqTzviPk/Fqd1HYmMjIQ+NzFMzrK+93LJa4civDvw1+hEg==", + "dev": true, + "requires": { + "jasmine-fail-fast": "~2.0.0" + } + }, "protractor-screenshoter-plugin": { "version": "0.10.3", "resolved": "https://registry.npmjs.org/protractor-screenshoter-plugin/-/protractor-screenshoter-plugin-0.10.3.tgz", @@ -12563,20 +12579,18 @@ }, "dependencies": { "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" + "pify": "^3.0.0" } }, "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true } } @@ -17339,11 +17353,6 @@ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" }, - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=" - }, "os-locale": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", @@ -17397,17 +17406,17 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" - }, - "yargs-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", - "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", - "requires": { - "camelcase": "^3.0.0" - } } } }, + "yargs-parser": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-8.1.0.tgz", + "integrity": "sha512-yP+6QqN8BmrgW2ggLtTbdrOyBNSI7zBa4IykmiV5R1wl1JWNxQvWhMfMdmzIYtKU7oP3OOInY/tl2ov3BDjnJQ==", + "requires": { + "camelcase": "^4.1.0" + } + }, "yn": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.0.tgz", diff --git a/src/pybind/mgr/dashboard/frontend/package.json b/src/pybind/mgr/dashboard/frontend/package.json index 141b9986a7d..54bb37e10c1 100644 --- a/src/pybind/mgr/dashboard/frontend/package.json +++ b/src/pybind/mgr/dashboard/frontend/package.json @@ -112,6 +112,7 @@ "prettier": "1.18.2", "pretty-quick": "1.11.1", "protractor": "5.4.2", + "protractor-fail-fast": "3.1.0", "protractor-screenshoter-plugin": "0.10.3", "replace-in-file": "4.1.1", "transifex-i18ntool": "1.1.0", diff --git a/src/pybind/mgr/dashboard/frontend/protractor.conf.js b/src/pybind/mgr/dashboard/frontend/protractor.conf.js index 653e83fa8ed..956ffdd1e1c 100644 --- a/src/pybind/mgr/dashboard/frontend/protractor.conf.js +++ b/src/pybind/mgr/dashboard/frontend/protractor.conf.js @@ -2,6 +2,7 @@ // https://github.com/angular/protractor/blob/master/lib/config.ts const { SpecReporter } = require('jasmine-spec-reporter'); +let failFast = require("protractor-fail-fast"); const config = { SELENIUM_PROMISE_MANAGER: false, @@ -47,8 +48,12 @@ const config = { writeReportFreq: 'asap', imageToAscii: 'none', clearFoldersBeforeTest: true - } - ] + }, + failFast.init() + ], + afterLaunch: function() { + failFast.clean(); + } }; config.onPrepare = async () => { -- 2.39.5