Skip to content

Commit

Permalink
chore: fix format and minor jsdoc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
harsha509 committed Nov 8, 2024
1 parent 7aabb8d commit f8d6c36
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 48 deletions.
6 changes: 3 additions & 3 deletions javascript/grid-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"type": "module",
"dependencies": {
"@apollo/client": "3.11.8",
"@apollo/client": "3.11.9",
"@emotion/react": "11.13.3",
"@emotion/styled": "11.13.0",
"@mui/icons-material": "5.15.18",
Expand All @@ -16,10 +16,10 @@
"@types/react-dom": "18.2.22",
"@types/react-modal": "3.16.3",
"@types/react-router-dom": "5.3.3",
"graphql": "16.8.1",
"graphql": "16.9.0",
"graphql.macro": "1.4.2",
"path-browserify": "1.0.1",
"pretty-ms": "9.0.0",
"pretty-ms": "9.1.0",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-modal": "3.16.1",
Expand Down
3 changes: 1 addition & 2 deletions javascript/node/selenium-webdriver/bidi/browsingContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,7 @@ class BrowsingContext {
method: 'browsingContext.create',
params: Object.fromEntries(parameters),
}
const res = await this.bidi.send(params)
return res
return await this.bidi.send(params)
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class ContinueRequestParameters {
* Sets the cookies for the request.
*
* @param {Header[]} cookieHeaders - An array of cookie headers.
* @returns {continueRequestParameters} - The current instance of the ContinueRequestParameters for chaining.
* @returns {ContinueRequestParameters} - The current instance of the ContinueRequestParameters for chaining.
* @throws {Error} - If a cookie header is not an instance of Header.
*/
cookies(cookieHeaders) {
Expand Down
2 changes: 1 addition & 1 deletion javascript/node/selenium-webdriver/bidi/filterBy.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class FilterBy {
}

static logLevel(level) {
if (level === undefined || (level != undefined && !['debug', 'error', 'info', 'warning'].includes(level))) {
if (level === undefined || (level !== undefined && !['debug', 'error', 'info', 'warning'].includes(level))) {
throw Error(
`Please pass valid log level. Valid log levels are 'debug', 'error', 'info' and 'warning'. Received: ${level}`,
)
Expand Down
4 changes: 3 additions & 1 deletion javascript/node/selenium-webdriver/bidi/logEntries.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ const { Source } = require('./scriptTypes')

/**
* Represents a base log entry.
* Desribed in https://w3c.github.io/webdriver-bidi/#types-log-logentry.
* Described in https://w3c.github.io/webdriver-bidi/#types-log-logentry.
*/
class BaseLogEntry {
/**
* Creates a new instance of BaseLogEntry.
* @param {string} level - The log level.
* @param {source} source - Script Source
* @param {string} text - The log source.
* @param {string} text - The log text.
* @param {number} timeStamp - The log timestamp.
Expand Down Expand Up @@ -86,6 +87,7 @@ class GenericLogEntry extends BaseLogEntry {
/**
* Creates an instance of GenericLogEntry.
* @param {string} level - The log level.
* @param {source} source - Script Source
* @param {string} text - The log text.
* @param {Date} timeStamp - The log timestamp.
* @param {string} type - The log type.
Expand Down
4 changes: 2 additions & 2 deletions javascript/node/selenium-webdriver/bidi/protocolValue.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class LocalValue {
/**
* Creates a new LocalValue object from the passed object.
*
* @param {Object} map - The object.
* @param {Object} object - The object.
* @returns {LocalValue} - The created LocalValue object.
*/
static createObjectValue(object) {
Expand Down Expand Up @@ -431,7 +431,7 @@ class ChannelValue {
}
}

if (resultOwnership != undefined) {
if (resultOwnership !== undefined) {
if (['root', 'none'].includes(resultOwnership)) {
this.resultOwnership = resultOwnership
} else {
Expand Down
12 changes: 2 additions & 10 deletions javascript/node/selenium-webdriver/bidi/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,7 @@ class Storage {
Object.prototype.hasOwnProperty.call(response.result.partitionKey, 'userContext') &&
Object.prototype.hasOwnProperty.call(response.result.partitionKey, 'sourceOrigin')
) {
let partitionKey = new PartitionKey(
response.result.partitionKey.userContext,
response.result.partitionKey.sourceOrigin,
)
return partitionKey
return new PartitionKey(response.result.partitionKey.userContext, response.result.partitionKey.sourceOrigin)
}
}
}
Expand Down Expand Up @@ -182,11 +178,7 @@ class Storage {
Object.prototype.hasOwnProperty.call(response.result.partitionKey, 'userContext') &&
Object.prototype.hasOwnProperty.call(response.result.partitionKey, 'sourceOrigin')
) {
let partitionKey = new PartitionKey(
response.result.partitionKey.userContext,
response.result.partitionKey.sourceOrigin,
)
return partitionKey
return new PartitionKey(response.result.partitionKey.userContext, response.result.partitionKey.sourceOrigin)
}
}
}
Expand Down
56 changes: 28 additions & 28 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f8d6c36

Please sign in to comment.