diff --git a/tests/bslocal.conf.ts b/tests/bslocal.conf.ts index 4aa82eb..1c9e2c3 100644 --- a/tests/bslocal.conf.ts +++ b/tests/bslocal.conf.ts @@ -75,7 +75,7 @@ addBrowsers(environments, BSLOCAL_CAPABILITIES, 'OS X', ['Big Sur'], ['Safari'], // Code to copy seleniumhost/port into test settings for (const i in nightwatch_config.test_settings) { - let config = nightwatch_config.test_settings[i]; + const config = nightwatch_config.test_settings[i]; if (config === undefined || nightwatch_config.selenium === undefined) { continue; } diff --git a/tests/config.ts b/tests/config.ts index e33ff99..e880884 100644 --- a/tests/config.ts +++ b/tests/config.ts @@ -19,15 +19,15 @@ export interface Capabilities { } export interface BrowserCapabilities extends Capabilities { - browser_version: string, + browserVersion: string, os: string, - os_version: string; + osVersion: string; } export interface MobileCapabilities extends Capabilities { device: string, - real_mobile: boolean, - os_version: string; + realMobile: boolean, + osVersion: string; } export interface TestEnvironment { @@ -51,17 +51,17 @@ export interface Configuration { export function browserCapabilities(browserName: string, browserVersion: string, osName: string, osVersion: string): BrowserCapabilities { return { 'browserName': browserName, - 'browser_version': browserVersion, + 'browserVersion': browserVersion, 'os': osName, - 'os_version': osVersion, + 'osVersion': osVersion, } } -export function mobileCapabilities(deviceOS: string, deviceName: string, osVersion: string, realMobile: boolean=true): MobileCapabilities { +export function mobileCapabilities(deviceOS: string, deviceName: string, osVersion: string, realMobile=true): MobileCapabilities { return { 'device': deviceName, - 'os_version': osVersion, - 'real_mobile': realMobile, + 'osVersion': osVersion, + 'realMobile': realMobile, 'browserName': deviceOS, // Seems strange, but this is what BrowserStack shows in their examples } } @@ -80,7 +80,7 @@ export function addBrowsers(environments: { [env: string]: TestEnvironment | und } } -export function addPhones(environments: { [env: string]: TestEnvironment | undefined }, baseCapabilities: object, osType: string, devicesAndVersions: string[][], envKeyMaker: (device: string, osVersion: string) => string, realMobile: boolean=true) { +export function addPhones(environments: { [env: string]: TestEnvironment | undefined }, baseCapabilities: object, osType: string, devicesAndVersions: string[][], envKeyMaker: (device: string, osVersion: string) => string, realMobile=true) { for (const [device, osVersion] of devicesAndVersions) { const key = envKeyMaker(device, osVersion); environments[key] = { diff --git a/tests/local.conf.ts b/tests/local.conf.ts index 7fb8bf7..c504403 100644 --- a/tests/local.conf.ts +++ b/tests/local.conf.ts @@ -98,19 +98,19 @@ function loadServices(): Services { const s: Services = {}; try { s.seleniumServer = require('selenium-server'); - } catch (err) {} + } catch (err) { /* empty */ } try { s.chromedriver = require('chromedriver'); - } catch (err) {} + } catch (err) { /* empty */ } try { s.geckodriver = require('geckodriver'); - } catch (err) {} + } catch (err) { /* empty */ } try { s.edgedriver = require('edgedriver'); - } catch (err) {} + } catch (err) { /* empty */ } return s; } \ No newline at end of file