From 5dbf413706d1ed98465b7a7204eba20cac5c7dd6 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Sat, 28 Jan 2017 21:19:51 +0200 Subject: [PATCH] Temporeraly revert upgrade to protractor 5 Until https://github.com/angular/protractor/pull/3963 is merged This reverts commit 117d5bf9ec92ce4ca701de6b75542f038e93ef2e. --- package.json | 2 +- tests/e2e/helpers.js | 7 +--- tests/e2e/redoc.e2e.js | 13 +++---- yarn.lock | 88 ++++++++++++------------------------------ 4 files changed, 32 insertions(+), 78 deletions(-) diff --git a/package.json b/package.json index 5bad268ab3..96f0c3c90b 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "ngc-webpack": "^1.1.0", "node-sass": "^4.1.1", "phantomjs-prebuilt": "^2.1.7", - "protractor": "^5.0.0", + "protractor": "^4.0.10", "raw-loader": "^0.5.1", "rimraf": "^2.5.4", "rxjs": "^5.0.1", diff --git a/tests/e2e/helpers.js b/tests/e2e/helpers.js index f846ec01cf..4c00744b3b 100644 --- a/tests/e2e/helpers.js +++ b/tests/e2e/helpers.js @@ -99,15 +99,10 @@ function eachNth(obj, n) { return res; } -function getInnerHtml(locator) { - return browser.executeScript("return arguments[0].innerHTML;", $(locator)); -} - module.exports = { loadJson: loadJson, verifyNoBrowserErrors: verifyNoBrowserErrors, scrollToEl: scrollToEl, fixFFTest: fixFFTest, - eachNth: eachNth, - getInnerHtml: getInnerHtml + eachNth: eachNth } diff --git a/tests/e2e/redoc.e2e.js b/tests/e2e/redoc.e2e.js index c0fb08df92..c3abfb08a1 100644 --- a/tests/e2e/redoc.e2e.js +++ b/tests/e2e/redoc.e2e.js @@ -3,7 +3,6 @@ const verifyNoBrowserErrors = require('./helpers').verifyNoBrowserErrors; const scrollToEl = require('./helpers').scrollToEl; const fixFFTest = require('./helpers').fixFFTest; const eachNth = require('./helpers').eachNth; -const getInnerHtml = require('./helpers').getInnerHtml; const URL = 'index.html'; @@ -57,17 +56,17 @@ describe('Scroll sync', () => { it('should update active menu entries on page scroll forwards', () => { scrollToEl('[section="tag/store"]').then(() => { - expect(getInnerHtml('.menu-item.menu-item-depth-1.active > .menu-item-header')).toContain('store'); - expect(getInnerHtml('.selected-tag')).toContain('store'); + expect($('.menu-item.menu-item-depth-1.active > .menu-item-header').getInnerHtml()).toContain('store'); + expect($('.selected-tag').getInnerHtml()).toContain('store'); }); }); it('should update active menu entries on page scroll backwards', () => { scrollToEl('[operation-id="getPetById"]').then(() => { - expect(getInnerHtml('.menu-item.menu-item-depth-1.active .menu-item-header')).toContain('pet'); - expect(getInnerHtml('.selected-tag')).toContain('pet'); - expect(getInnerHtml('.menu-item.menu-item-depth-2.active .menu-item-header')).toContain('Find pet by ID'); - expect(getInnerHtml('.selected-endpoint')).toContain('Find pet by ID'); + expect($('.menu-item.menu-item-depth-1.active .menu-item-header').getInnerHtml()).toContain('pet'); + expect($('.selected-tag').getInnerHtml()).toContain('pet'); + expect($('.menu-item.menu-item-depth-2.active .menu-item-header').getInnerHtml()).toContain('Find pet by ID'); + expect($('.selected-endpoint').getInnerHtml()).toContain('Find pet by ID'); }); }); }); diff --git a/yarn.lock b/yarn.lock index e5387fd02b..3ab5f6aeca 100644 --- a/yarn.lock +++ b/yarn.lock @@ -46,7 +46,7 @@ version "0.9.35" resolved "https://registry.yarnpkg.com/@types/core-js/-/core-js-0.9.35.tgz#444064e63711cdcc62ea844d27642f6efc2285f2" -"@types/jasmine@^2.2.32": +"@types/jasmine@^2.2.32", "@types/jasmine@^2.5.36": version "2.5.41" resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-2.5.41.tgz#d5e86161a0af80d52062b310a33ed65b051a0713" @@ -62,9 +62,9 @@ version "2.1.28" resolved "https://registry.yarnpkg.com/@types/requirejs/-/requirejs-2.1.28.tgz#bfb2c1d5a03a22ab137ff020abae9338b66efdad" -"@types/selenium-webdriver@^2.53.35", "@types/selenium-webdriver@~2.53.39": - version "2.53.39" - resolved "https://registry.yarnpkg.com/@types/selenium-webdriver/-/selenium-webdriver-2.53.39.tgz#15ff93392c339abd39d6d3a04e715faa9a263cf3" +"@types/selenium-webdriver@2.53.37": + version "2.53.37" + resolved "https://registry.yarnpkg.com/@types/selenium-webdriver/-/selenium-webdriver-2.53.37.tgz#34f743c20e53ae7100ede90870fde554df2447f8" "@types/should@^8.1.28": version "8.1.30" @@ -95,7 +95,7 @@ adm-zip@0.4.4: version "0.4.4" resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.4.tgz#a61ed5ae6905c3aea58b3a657d25033091052736" -adm-zip@^0.4.7: +adm-zip@0.4.7, adm-zip@^0.4.7: version "0.4.7" resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.7.tgz#8606c2cbf1c426ce8c8ec00174447fd49b6eafc1" @@ -472,14 +472,6 @@ block-stream@*: dependencies: inherits "~2.0.0" -blocking-proxy@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/blocking-proxy/-/blocking-proxy-0.0.2.tgz#f3364b4e5c2b266ba01d69b2a1c96cd89b7680de" - dependencies: - es6-promise "^4.0.5" - minimist "^1.2.0" - selenium-webdriver "2.53.3" - bluebird@^3.3.0: version "3.4.7" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.4.7.tgz#f72d760be09b7f76d08ed8fae98b289a8d05fab3" @@ -1431,7 +1423,7 @@ es6-promise@^3.1.2: version "3.3.1" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.3.1.tgz#a08cdde84ccdbf34d027a1451bc91d4bcd28a613" -es6-promise@^4.0.5, es6-promise@~4.0.3: +es6-promise@~4.0.3: version "4.0.5" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.0.5.tgz#7882f30adde5b240ccfa7f7d78c548330951ae42" @@ -2438,12 +2430,9 @@ jasmine@2.4.1: glob "^3.2.11" jasmine-core "~2.4.0" -jasminewd2@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jasminewd2/-/jasminewd2-0.1.1.tgz#5adff080d576c0a4b8637ccfb78954d27ecb7cdc" - dependencies: - jasmine "2.4.1" - selenium-webdriver "3.0.1" +jasminewd2@0.0.10: + version "0.0.10" + resolved "https://registry.yarnpkg.com/jasminewd2/-/jasminewd2-0.0.10.tgz#94f48ae2bc946cad643035467b4bb7ea9c1075ef" jodid25519@^1.0.0: version "1.0.2" @@ -3769,25 +3758,25 @@ protocols@^1.1.0, protocols@^1.4.0: version "1.4.3" resolved "https://registry.yarnpkg.com/protocols/-/protocols-1.4.3.tgz#635b1c0785f0b389e8a012df1b1afffda9608b76" -protractor@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/protractor/-/protractor-5.0.0.tgz#0935c487042c5f147d1dd03ab57b839a9d6c3368" +protractor@^4.0.10: + version "4.0.14" + resolved "https://registry.yarnpkg.com/protractor/-/protractor-4.0.14.tgz#efc4a877fac3a182a9dded26cd5869f4762fd172" dependencies: + "@types/jasmine" "^2.5.36" "@types/node" "^6.0.46" "@types/q" "^0.0.32" - "@types/selenium-webdriver" "~2.53.39" - blocking-proxy "0.0.2" + "@types/selenium-webdriver" "2.53.37" + adm-zip "0.4.7" chalk "^1.1.3" glob "^7.0.3" jasmine "2.4.1" - jasminewd2 "~0.1.0" + jasminewd2 "0.0.10" optimist "~0.6.0" q "1.4.1" saucelabs "~1.3.0" - selenium-webdriver "3.0.1" + selenium-webdriver "2.53.3" source-map-support "~0.4.0" - webdriver-js-extender "^0.2.2" - webdriver-manager "^11.1.1" + webdriver-manager "^10.3.0" proxy-addr@~1.1.2: version "1.1.3" @@ -4233,7 +4222,7 @@ sax@0.6.x: version "0.6.1" resolved "https://registry.yarnpkg.com/sax/-/sax-0.6.1.tgz#563b19c7c1de892e09bfc4f2fc30e3c27f0952b9" -sax@>=0.6.0, sax@~1.2.1: +sax@~1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a" @@ -4249,7 +4238,7 @@ select@^1.0.6: version "1.1.0" resolved "https://registry.yarnpkg.com/select/-/select-1.1.0.tgz#a6c520cd9ab919ad81c7d1a273e0452f504dd7a2" -selenium-webdriver@2.53.3, selenium-webdriver@^2.53.2: +selenium-webdriver@2.53.3: version "2.53.3" resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-2.53.3.tgz#d29ff5a957dff1a1b49dc457756e4e4bfbdce085" dependencies: @@ -4259,15 +4248,6 @@ selenium-webdriver@2.53.3, selenium-webdriver@^2.53.2: ws "^1.0.1" xml2js "0.4.4" -selenium-webdriver@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-3.0.1.tgz#a2dea5da4a97f6672e89e7ca7276cefa365147a7" - dependencies: - adm-zip "^0.4.7" - rimraf "^2.5.4" - tmp "0.0.30" - xml2js "^0.4.17" - semver-diff@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-2.1.0.tgz#4bbb8437c8d37e4b0cf1a68fd726ec6d645d6d36" @@ -4801,12 +4781,6 @@ tmp@0.0.28: dependencies: os-tmpdir "~1.0.1" -tmp@0.0.30: - version "0.0.30" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.30.tgz#72419d4a8be7d6ce75148fd8b324e593a711c2ed" - dependencies: - os-tmpdir "~1.0.1" - to-array@0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/to-array/-/to-array-0.1.4.tgz#17e6c11f73dd4f3d74cda7a4ff3238e9ad9bf890" @@ -5110,16 +5084,9 @@ wbuf@^1.1.0, wbuf@^1.4.0: dependencies: minimalistic-assert "^1.0.0" -webdriver-js-extender@^0.2.2: - version "0.2.3" - resolved "https://registry.yarnpkg.com/webdriver-js-extender/-/webdriver-js-extender-0.2.3.tgz#ad478badab804a65b67c3cdefe540f5708c35c79" - dependencies: - "@types/selenium-webdriver" "^2.53.35" - selenium-webdriver "^2.53.2" - -webdriver-manager@^11.1.1: - version "11.1.1" - resolved "https://registry.yarnpkg.com/webdriver-manager/-/webdriver-manager-11.1.1.tgz#903cd2d081ff95408041d1c3d920ce8bcdd8134f" +webdriver-manager@^10.3.0: + version "10.3.0" + resolved "https://registry.yarnpkg.com/webdriver-manager/-/webdriver-manager-10.3.0.tgz#99314588a0b1dbe688c441d74288c6cb1875fa8b" dependencies: adm-zip "^0.4.7" chalk "^1.1.1" @@ -5302,14 +5269,7 @@ xml2js@0.4.4: sax "0.6.x" xmlbuilder ">=1.0.0" -xml2js@^0.4.17: - version "0.4.17" - resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.17.tgz#17be93eaae3f3b779359c795b419705a8817e868" - dependencies: - sax ">=0.6.0" - xmlbuilder "^4.1.0" - -xmlbuilder@>=1.0.0, xmlbuilder@^4.1.0: +xmlbuilder@>=1.0.0: version "4.2.1" resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-4.2.1.tgz#aa58a3041a066f90eaa16c2f5389ff19f3f461a5" dependencies: