Fix some linting issues

This commit is contained in:
Jesse Hines 2025-08-02 10:26:04 -04:00
parent ba7accc2f9
commit 08ffc26dce
No known key found for this signature in database
4 changed files with 8 additions and 8 deletions

View file

@ -177,7 +177,7 @@ class WorkspacePage {
// on android, the context menu event is a glitchy and I can't get the longPress to work properly from wdio.
// Instead manually trigger it in js:
await browser.execute((elem) => {
let {bottom, left, right, top} = elem.getBoundingClientRect()
const {bottom, left, right, top} = elem.getBoundingClientRect()
const x = (right - left)/2 + left; // get middle
const y = (bottom - top)/2 + top;
elem.dispatchEvent(new MouseEvent("contextmenu", {

View file

@ -85,9 +85,9 @@ describe('Test basic deduplicate', function() {
await workspacePage.openFile("A.md");
await workspacePage.openFile("B.md");
await workspacePage.setActiveFile("A.md");
const button = await browser
const button: ChainablePromiseElement = await browser
.$$(".workspace-tab-header")
.find(e => e.$("div.*=Outgoing links").isExisting()) as ChainablePromiseElement;
.find(e => e.$("div.*=Outgoing links").isExisting());
await button.click()
const item = browser.$(".workspace-leaf-content[data-type='outgoing-link']").$("div=B");
await item.click()

View file

@ -50,7 +50,7 @@ describe('Misc', function() {
await browser.executeObsidianCommand("open-tab-settings:toggle-open-in-new-tab");
const value = await browser.executeObsidian(async ({plugins}) => {
return plugins.openTabSettings.settings.openInNewTab;
})
});
expect(value).toEqual(true);
});
})

View file

@ -53,9 +53,9 @@ describe('Test basic open in new tab', function() {
it('opens in new tab from sidebar outgoing links', async function() {
if ((await obsidianPage.getPlatform()).isMobile) this.skip();
await workspacePage.openFile("A.md");
const button = await browser
const button: ChainablePromiseElement = await browser
.$$(".workspace-tab-header")
.find(e => e.$("div.*=Outgoing links").isExisting()) as ChainablePromiseElement
.find(e => e.$("div.*=Outgoing links").isExisting());
await button.click();
const item = browser.$(".workspace-leaf-content[data-type='outgoing-link']").$("div=B");
await item.click();
@ -117,9 +117,9 @@ describe('Test basic open in new tab', function() {
it('opens in new tab from bookmarks', async function() {
if ((await obsidianPage.getPlatform()).isMobile) this.skip();
await workspacePage.openFile("A.md");
const button = await browser
const button: ChainablePromiseElement = await browser
.$$(".workspace-tab-header")
.find(e => e.$("div.*=Bookmarks").isExisting()) as ChainablePromiseElement;
.find(e => e.$("div.*=Bookmarks").isExisting());
await button.click();
const item = browser.$(".workspace-leaf-content[data-type='bookmarks'] [data-path=B]");
await item.click();