obsidian-testing-framework/packages/test-project/e2e/example.spec.ts
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 7d99907277
Some checks failed
Playwright Tests / test (push) Failing after 1m4s
maybe?
2024-10-23 03:01:47 -04:00

23 lines
759 B
TypeScript

import { expect } from '@playwright/test';
import {test} from "obsidian-testing-framework"
import {doWithApp, getApp} from "obsidian-testing-framework/utils";
test('something', async ({ page }) => {
console.log(page.url());
expect(/obsidian\.md/i.test(page.url())).toBeTruthy()
});
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")
})