mirror of
https://github.com/jesse-r-s-hines/obsidian-open-tab-settings.git
synced 2026-07-22 05:43:41 +00:00
Fix some linting issues
This commit is contained in:
parent
ba7accc2f9
commit
08ffc26dce
4 changed files with 8 additions and 8 deletions
|
|
@ -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", {
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
});
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue