Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c committed Mar 20, 2024
1 parent 06c008d commit 8640896
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 0 additions & 1 deletion javascript/node/selenium-webdriver/bidi/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ class Input {
}

async setFiles(browsingContextId, element, files) {

if (typeof element !== 'string' && !(element instanceof ReferenceValue)) {
throw Error(`Pass in a WebElement id as a string or a ReferenceValue. Received: ${element}`)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ suite(
const input = await Input(driver)
await driver.get(Pages.formPage)

const filePath = await io.tmpFile().then(function(fp) {
const filePath = await io.tmpFile().then(function (fp) {
fs.writeFileSync(fp, FILE_HTML)
return fp
})
Expand All @@ -65,7 +65,9 @@ suite(

const webElementId = await webElement.getId()

await input.setFiles(browsingContextId, new ReferenceValue(RemoteReferenceType.SHARED_ID, webElementId), [filePath])
await input.setFiles(browsingContextId, new ReferenceValue(RemoteReferenceType.SHARED_ID, webElementId), [
filePath,
])

assert.notEqual(await webElement.getAttribute('value'), '')
})
Expand All @@ -75,7 +77,7 @@ suite(
const input = await Input(driver)
await driver.get(Pages.formPage)

const filePath = await io.tmpFile().then(function(fp) {
const filePath = await io.tmpFile().then(function (fp) {
fs.writeFileSync(fp, FILE_HTML)
return fp
})
Expand Down
6 changes: 3 additions & 3 deletions javascript/node/selenium-webdriver/test/driver_factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function GetBrowserForTests() {
let browser = process.env.SELENIUM_BROWSER

// If we have no browser set, fail the build
if (!!!browser) {
if (!browser) {
throw new Error('SELENIUM_BROWSER env var not set')
}

Expand All @@ -44,8 +44,8 @@ function GetBrowserForTests() {
let binary = process.env.BROWSER_BINARY
let driverBinary = process.env.DRIVER_BINARY

let resolvedBinary = !!binary ? runfiles.resolve(driverBinary) : undefined
let resolvedDriver = !!driverBinary ? runfiles.resolve(binary) : undefined
let resolvedBinary = binary ? runfiles.resolve(driverBinary) : undefined
let resolvedDriver = driverBinary ? runfiles.resolve(binary) : undefined

// Create a temporary directory we can use as a home dir
// process.env["USER"] = "nobody"
Expand Down

0 comments on commit 8640896

Please sign in to comment.