From dccf4dd92d38e95a7966cf92e5cc7f5558b4ea6f Mon Sep 17 00:00:00 2001 From: Sri Harsha Date: Tue, 16 Feb 2021 11:13:25 +0530 Subject: [PATCH] [JS] Removing duplicate variable declaration of IE from capabilities --- .../node/selenium-webdriver/lib/capabilities.js | 1 - .../node/selenium-webdriver/package-lock.json | 2 +- .../node/selenium-webdriver/test/cookie_test.js | 14 +++++++------- .../test/element_finding_test.js | 2 +- .../selenium-webdriver/test/execute_script_test.js | 2 +- .../node/selenium-webdriver/test/logging_test.js | 2 +- .../node/selenium-webdriver/test/proxy_test.js | 4 ++-- .../node/selenium-webdriver/testing/index.js | 4 ++-- 8 files changed, 15 insertions(+), 16 deletions(-) diff --git a/javascript/node/selenium-webdriver/lib/capabilities.js b/javascript/node/selenium-webdriver/lib/capabilities.js index bb564715ede16..fb2cc43b060bb 100644 --- a/javascript/node/selenium-webdriver/lib/capabilities.js +++ b/javascript/node/selenium-webdriver/lib/capabilities.js @@ -32,7 +32,6 @@ const Browser = { CHROME: 'chrome', EDGE: 'MicrosoftEdge', FIREFOX: 'firefox', - IE: 'internet explorer', INTERNET_EXPLORER: 'internet explorer', SAFARI: 'safari', OPERA: 'opera', diff --git a/javascript/node/selenium-webdriver/package-lock.json b/javascript/node/selenium-webdriver/package-lock.json index 917f05b44af4f..d224abad64a4a 100644 --- a/javascript/node/selenium-webdriver/package-lock.json +++ b/javascript/node/selenium-webdriver/package-lock.json @@ -1,6 +1,6 @@ { "name": "selenium-webdriver", - "version": "4.0.0-alpha.8", + "version": "4.0.0-beta.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/javascript/node/selenium-webdriver/test/cookie_test.js b/javascript/node/selenium-webdriver/test/cookie_test.js index bd3bfa666a341..85f6f076fbf6c 100644 --- a/javascript/node/selenium-webdriver/test/cookie_test.js +++ b/javascript/node/selenium-webdriver/test/cookie_test.js @@ -64,7 +64,7 @@ suite(function (env) { return assertHasCookies(cookie1, cookie2) }) - ignore(env.browsers(Browser.IE)).it( + ignore(env.browsers(Browser.INTERNET_EXPLORER)).it( 'only returns cookies visible to the current page', async function () { const cookie1 = createCookieSpec() @@ -166,7 +166,7 @@ suite(function (env) { await assertHasCookies() }) - ignore(env.browsers(Browser.FIREFOX, Browser.IE)).it( + ignore(env.browsers(Browser.FIREFOX, Browser.INTERNET_EXPLORER)).it( 'should retain cookie expiry', async function () { let expirationDelay = 5 * 1000 @@ -189,7 +189,7 @@ suite(function (env) { } ) - ignore(env.browsers(Browser.FIREFOX, Browser.IE, Browser.SAFARI)).it( + ignore(env.browsers(Browser.FIREFOX, Browser.INTERNET_EXPLORER, Browser.SAFARI)).it( 'can add same site cookie property to `Strict`', async function () { let cookie = createSameSiteCookieSpec('Strict') @@ -201,7 +201,7 @@ suite(function (env) { } ) - ignore(env.browsers(Browser.FIREFOX, Browser.IE, Browser.SAFARI)).it( + ignore(env.browsers(Browser.FIREFOX, Browser.INTERNET_EXPLORER, Browser.SAFARI)).it( 'can add same site cookie property to `Lax`', async function () { let cookie = createSameSiteCookieSpec('Lax') @@ -213,7 +213,7 @@ suite(function (env) { } ) - ignore(env.browsers(Browser.IE, Browser.SAFARI)).it( + ignore(env.browsers(Browser.INTERNET_EXPLORER, Browser.SAFARI)).it( 'can add same site cookie property to `None` when cookie is Secure', async function () { let cookie = createSameSiteCookieSpec('None', { @@ -228,7 +228,7 @@ suite(function (env) { } ) - ignore(env.browsers(Browser.IE, Browser.SAFARI)).it( + ignore(env.browsers(Browser.INTERNET_EXPLORER, Browser.SAFARI)).it( 'throws an error if same site is set to `None` and the cookie is not Secure', async function () { let cookie = createSameSiteCookieSpec('None') @@ -244,7 +244,7 @@ suite(function (env) { } ) - ignore(env.browsers(Browser.IE, Browser.SAFARI)).it( + ignore(env.browsers(Browser.INTERNET_EXPLORER, Browser.SAFARI)).it( 'throws an error if same site cookie property is invalid', async function () { let cookie = createSameSiteCookieSpec('Foo') diff --git a/javascript/node/selenium-webdriver/test/element_finding_test.js b/javascript/node/selenium-webdriver/test/element_finding_test.js index 6f1adb0c6eb63..4609f00fa4a79 100644 --- a/javascript/node/selenium-webdriver/test/element_finding_test.js +++ b/javascript/node/selenium-webdriver/test/element_finding_test.js @@ -333,7 +333,7 @@ suite(function (env) { }) // IE only supports short version option[selected]. - ignore(browsers(Browser.IE)).it( + ignore(browsers(Browser.INTERNET_EXPLORER)).it( 'should be able to find element by boolean attribute', async function () { await driver.get( diff --git a/javascript/node/selenium-webdriver/test/execute_script_test.js b/javascript/node/selenium-webdriver/test/execute_script_test.js index 7aea31a67967f..1fd16f9f66421 100644 --- a/javascript/node/selenium-webdriver/test/execute_script_test.js +++ b/javascript/node/selenium-webdriver/test/execute_script_test.js @@ -116,7 +116,7 @@ suite(function (env) { return execute('return [[1, 2, [3]]]').then(verifyJson([[1, 2, [3]]])) }) - ignore(env.browsers(Browser.IE)).it( + ignore(env.browsers(Browser.INTERNET_EXPLORER)).it( 'can return empty object literal', function () { return execute('return {}').then(verifyJson({})) diff --git a/javascript/node/selenium-webdriver/test/logging_test.js b/javascript/node/selenium-webdriver/test/logging_test.js index 1936e4bc8faec..8d7632c5e6d8e 100644 --- a/javascript/node/selenium-webdriver/test/logging_test.js +++ b/javascript/node/selenium-webdriver/test/logging_test.js @@ -26,7 +26,7 @@ test.suite(function (env) { // Logging API not supported in Marionette. // Logging API not supported in Safari. test - .ignore(env.browsers(Browser.IE, Browser.SAFARI, Browser.FIREFOX)) + .ignore(env.browsers(Browser.INTERNET_EXPLORER, Browser.SAFARI, Browser.FIREFOX)) .describe('logging', function () { var driver diff --git a/javascript/node/selenium-webdriver/test/proxy_test.js b/javascript/node/selenium-webdriver/test/proxy_test.js index a1686d6edc6d8..e6845477cf849 100644 --- a/javascript/node/selenium-webdriver/test/proxy_test.js +++ b/javascript/node/selenium-webdriver/test/proxy_test.js @@ -124,7 +124,7 @@ test.suite(function (env) { // Proxy support not implemented. test .ignore( - env.browsers(Browser.CHROME, Browser.IE, Browser.SAFARI, Browser.FIREFOX) + env.browsers(Browser.CHROME, Browser.INTERNET_EXPLORER, Browser.SAFARI, Browser.FIREFOX) ) .describe('manual proxy settings', function () { it('can configure HTTP proxy host', async function () { @@ -175,7 +175,7 @@ test.suite(function (env) { // Safari does not support proxies. test .ignore( - env.browsers(Browser.IE, Browser.SAFARI, Browser.CHROME, Browser.FIREFOX) + env.browsers(Browser.INTERNET_EXPLORER, Browser.SAFARI, Browser.CHROME, Browser.FIREFOX) ) .describe('pac proxy settings', function () { it('can configure proxy through PAC file', async function () { diff --git a/javascript/node/selenium-webdriver/testing/index.js b/javascript/node/selenium-webdriver/testing/index.js index f90a3653f9353..bb5764fe68577 100644 --- a/javascript/node/selenium-webdriver/testing/index.js +++ b/javascript/node/selenium-webdriver/testing/index.js @@ -100,7 +100,7 @@ function getBrowsersToTestFromEnv() { const parts = spec.split(/:/, 3) let name = parts[0] if (name === 'ie') { - name = Browser.IE + name = Browser.INTERNET_EXPLORER } else if (name === 'edge') { name = Browser.EDGE } @@ -126,7 +126,7 @@ function getAvailableBrowsers() { { 'ms:edgeChromium': true }, ], [firefox.locateSynchronously, Browser.FIREFOX], - [ie.locateSynchronously, Browser.IE], + [ie.locateSynchronously, Browser.INTERNET_EXPLORER], [safari.locateSynchronously, Browser.SAFARI], [opera.locateSynchronously, Browser.OPERA], ]