From bb312c2818871d1c6a01dd489610fcd3aa7fcab6 Mon Sep 17 00:00:00 2001 From: PeterYinusa <53189696+PeterYinusa@users.noreply.github.com> Date: Thu, 2 Dec 2021 18:28:24 +0000 Subject: [PATCH] update selenium-webdriver to v4.1.0 (#12922) * update selenium-webdriver to v4.1.0 * fix tests --- package.json | 2 +- .../selenium-webdriver+4.0.0-alpha.7.patch | 19 ---------- test/e2e/tests/address-book.spec.js | 2 +- test/e2e/tests/metamask-responsive-ui.spec.js | 2 +- test/e2e/tests/send-eth.spec.js | 6 ++-- yarn.lock | 36 +++++++++---------- 6 files changed, 24 insertions(+), 43 deletions(-) delete mode 100644 patches/selenium-webdriver+4.0.0-alpha.7.patch diff --git a/package.json b/package.json index 9dcec5e9a..d168e0043 100644 --- a/package.json +++ b/package.json @@ -335,7 +335,7 @@ "resolve-url-loader": "^3.1.2", "sass": "^1.32.4", "sass-loader": "^10.1.1", - "selenium-webdriver": "4.0.0-alpha.7", + "selenium-webdriver": "^4.1.0", "semver": "^7.3.5", "serve-handler": "^6.1.2", "sinon": "^9.0.0", diff --git a/patches/selenium-webdriver+4.0.0-alpha.7.patch b/patches/selenium-webdriver+4.0.0-alpha.7.patch deleted file mode 100644 index 53144785b..000000000 --- a/patches/selenium-webdriver+4.0.0-alpha.7.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/node_modules/selenium-webdriver/chromium.js b/node_modules/selenium-webdriver/chromium.js -index d828ce5..87176f4 100644 ---- a/node_modules/selenium-webdriver/chromium.js -+++ b/node_modules/selenium-webdriver/chromium.js -@@ -197,6 +197,14 @@ class ServiceBuilder extends remote.DriverService.Builder { - return this.addArguments('--log-path=' + path); - } - -+ /** -+ * Enables Chrome logging. -+ * @returns {!ServiceBuilder} A self reference. -+ */ -+ enableChromeLogging() { -+ return this.addArguments('--enable-chrome-logs'); -+ } -+ - /** - * Enables verbose logging. - * @return {!ServiceBuilder} A self reference. diff --git a/test/e2e/tests/address-book.spec.js b/test/e2e/tests/address-book.spec.js index 1468c5734..707c72e00 100644 --- a/test/e2e/tests/address-book.spec.js +++ b/test/e2e/tests/address-book.spec.js @@ -50,7 +50,7 @@ describe('Address Book', function () { const inputAmount = await driver.findElement('.unit-input__input'); await inputAmount.fill('1'); - const inputValue = await inputAmount.getAttribute('value'); + const inputValue = await inputAmount.getProperty('value'); assert.equal(inputValue, '1'); await driver.clickElement({ text: 'Next', tag: 'button' }); diff --git a/test/e2e/tests/metamask-responsive-ui.spec.js b/test/e2e/tests/metamask-responsive-ui.spec.js index adb5ad644..dc50fc9cd 100644 --- a/test/e2e/tests/metamask-responsive-ui.spec.js +++ b/test/e2e/tests/metamask-responsive-ui.spec.js @@ -226,7 +226,7 @@ describe('Metamask Responsive UI', function () { const inputAmount = await driver.fill('.unit-input__input', '1'); - const inputValue = await inputAmount.getAttribute('value'); + const inputValue = await inputAmount.getProperty('value'); assert.equal(inputValue, '1'); // confirming transcation diff --git a/test/e2e/tests/send-eth.spec.js b/test/e2e/tests/send-eth.spec.js index 1fbebfaa7..7d88f121a 100644 --- a/test/e2e/tests/send-eth.spec.js +++ b/test/e2e/tests/send-eth.spec.js @@ -52,7 +52,7 @@ describe('Send ETH from inside MetaMask using default gas', function () { ); await amountMax.click(); - let inputValue = await inputAmount.getAttribute('value'); + let inputValue = await inputAmount.getProperty('value'); assert(Number(inputValue) > 24); @@ -62,7 +62,7 @@ describe('Send ETH from inside MetaMask using default gas', function () { await inputAmount.fill('1'); - inputValue = await inputAmount.getAttribute('value'); + inputValue = await inputAmount.getProperty('value'); assert.equal(inputValue, '1'); // Continue to next screen @@ -119,7 +119,7 @@ describe('Send ETH from inside MetaMask using advanced gas modal', function () { const inputAmount = await driver.findElement('.unit-input__input'); await inputAmount.fill('1'); - const inputValue = await inputAmount.getAttribute('value'); + const inputValue = await inputAmount.getProperty('value'); assert.equal(inputValue, '1'); // Continue to next screen diff --git a/yarn.lock b/yarn.lock index 2b29606e0..ec5a26d39 100644 --- a/yarn.lock +++ b/yarn.lock @@ -17261,7 +17261,7 @@ jss@^10.0.3, jss@^10.3.0: array-includes "^3.1.2" object.assign "^4.1.2" -jszip@^3.2.2: +jszip@^3.6.0: version "3.7.1" resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.7.1.tgz#bd63401221c15625a1228c556ca8a68da6fda3d9" integrity sha512-ghL0tz1XG9ZEmRMcEN2vt7xabrDdqHHeykgARpmZ0BiIctWxM47Vt63ZO2dnp4QYt/xJVLLy5Zv1l/xRdh2byg== @@ -20984,7 +20984,7 @@ os-locale@^3.1.0: lcid "^2.0.0" mem "^4.0.0" -os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.1, os-tmpdir@~1.0.2: +os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= @@ -24427,7 +24427,7 @@ rimraf@2.6.3, rimraf@~2.6.2: dependencies: glob "^7.1.3" -rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.3, rimraf@^2.7.1: +rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.3: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== @@ -24873,14 +24873,14 @@ select@^1.1.2: resolved "https://registry.yarnpkg.com/select/-/select-1.1.2.tgz#0e7350acdec80b1108528786ec1d4418d11b396d" integrity sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0= -selenium-webdriver@4.0.0-alpha.7: - version "4.0.0-alpha.7" - resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-4.0.0-alpha.7.tgz#e3879d8457fd7ad8e4424094b7dc0540d99e6797" - integrity sha512-D4qnTsyTr91jT8f7MfN+OwY0IlU5+5FmlO5xlgRUV6hDEV8JyYx2NerdTEqDDkNq7RZDYc4VoPALk8l578RBHw== +selenium-webdriver@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/selenium-webdriver/-/selenium-webdriver-4.1.0.tgz#d11e5d43674e2718265a30684bcbf6ec734fd3bd" + integrity sha512-kUDH4N8WruYprTzvug4Pl73Th+WKb5YiLz8z/anOpHyUNUdM3UzrdTOxmSNaf9AczzBeY+qXihzku8D1lMaKOg== dependencies: - jszip "^3.2.2" - rimraf "^2.7.1" - tmp "0.0.30" + jszip "^3.6.0" + tmp "^0.2.1" + ws ">=7.4.6" semaphore@>=1.0.1, semaphore@^1.0.3, semaphore@^1.1.0: version "1.1.0" @@ -26871,13 +26871,6 @@ title-case@^2.1.0: no-case "^2.2.0" upper-case "^1.0.3" -tmp@0.0.30: - version "0.0.30" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.30.tgz#72419d4a8be7d6ce75148fd8b324e593a711c2ed" - integrity sha1-ckGdSovn1s51FI/YsyTlk6cRwu0= - dependencies: - os-tmpdir "~1.0.1" - tmp@0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.1.0.tgz#ee434a4e22543082e294ba6201dcc6eafefa2877" @@ -26892,6 +26885,13 @@ tmp@^0.0.33: dependencies: os-tmpdir "~1.0.2" +tmp@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.1.tgz#8457fc3037dcf4719c251367a1af6500ee1ccf14" + integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ== + dependencies: + rimraf "^3.0.0" + tmpl@1.0.x: version "1.0.5" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" @@ -28880,7 +28880,7 @@ write@^0.2.1: dependencies: mkdirp "^0.5.1" -ws@7.1.0, ws@7.4.6, ws@^1.1.0, ws@^3.0.0, ws@^5.1.1, ws@^7, ws@^7.2.0, ws@^7.4.0, ws@^7.4.6, ws@~7.4.2, ws@~8.2.3: +ws@7.1.0, ws@7.4.6, ws@>=7.4.6, ws@^1.1.0, ws@^3.0.0, ws@^5.1.1, ws@^7, ws@^7.2.0, ws@^7.4.0, ws@^7.4.6, ws@~7.4.2, ws@~8.2.3: version "7.4.6" resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==