Skip to content

Commit

Permalink
refactor: eslint findings
Browse files Browse the repository at this point in the history
  • Loading branch information
vobu committed Feb 6, 2025
1 parent 7d3222b commit fcf2c7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/lib/wdi5-bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@ export async function _addWdi5Commands(browserInstance: WebdriverIO.Browser) {
// when object is undefined the previous function call failed
try {
return object[prop]
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (error) {
// different node versions return a different `error.message` so we use our own message
if (logging) {
Expand Down Expand Up @@ -474,7 +475,7 @@ export async function _addWdi5Commands(browserInstance: WebdriverIO.Browser) {
// eslint-disable-next-line @typescript-eslint/no-empty-function
return new Proxy(function () {}, handler)
}
// @ts-ignore
// @ts-expect-error as design-time is not aware of _asControl
return makeFluent(browserInstance._asControl(ui5ControlSelector))
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/lib/wdi5-fe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export class WDI5FE {
// yet only wave the wand when there's an iframe somewhere,
// indicating BTP WorkZone territory
await browserInstance.switchToParentFrame()
// @ts-ignore
// @ts-expect-error Element cast to iframe
const iframe: Element = await browserInstance.findElement("css selector", "iframe")
let shell
if (!iframe.error) {
Expand All @@ -80,6 +80,7 @@ export class WDI5FE {
// back to app
try {
await browserInstance.switchToFrame(0)
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (err) {
// This try-catch block is a fail-safe code to make sure the execution continues if browser fails to switch to app's frame.
// It has been observed that for Launchpad apps, the switchToFrame(0) is not required.
Expand Down

0 comments on commit fcf2c7b

Please sign in to comment.