2024-10-22 18:33:44 -04:00
|
|
|
import { expect } from '@playwright/test';
|
2024-10-22 19:50:56 -04:00
|
|
|
import {test} from "obsidian-testing-framework"
|
2024-10-23 03:01:47 -04:00
|
|
|
import {doWithApp, getApp} from "obsidian-testing-framework/utils";
|
2024-10-22 18:33:44 -04:00
|
|
|
test('something', async ({ page }) => {
|
2024-10-23 03:01:47 -04:00
|
|
|
console.log(page.url());
|
|
|
|
expect(/obsidian\.md/i.test(page.url())).toBeTruthy()
|
2024-10-22 18:33:44 -04:00
|
|
|
});
|
2024-10-23 03:01:47 -04:00
|
|
|
test("idk", async({page}) => {
|
|
|
|
console.log("idk")
|
|
|
|
let what = await doWithApp(page,async (app) => {
|
|
|
|
console.log("hi", Object.keys(app), (app.metadataCache));
|
|
|
|
let thing = app.metadataCache.getFirstLinkpathDest("Welcome", "/");
|
|
|
|
console.log("THING", thing);
|
|
|
|
await new Promise(res => setTimeout(res, 5000))
|
|
|
|
console.log(thing?.path);
|
|
|
|
const what = {...thing};
|
|
|
|
delete what.parent;
|
|
|
|
delete what.vault;
|
|
|
|
return what;
|
|
|
|
});
|
|
|
|
expect(what.basename).toEqual("Welcome")
|
2024-10-22 18:33:44 -04:00
|
|
|
})
|