mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-07-23 04:52:58 +00:00
Keep P2P consumers on the current transport
This commit is contained in:
@@ -10,7 +10,7 @@ export {
|
||||
withObsidianPage,
|
||||
} from "@vrtmrz/obsidian-test-session";
|
||||
|
||||
export async function captureObsidianDialogue(
|
||||
export async function captureObsidianPage(
|
||||
port: number,
|
||||
filename: string,
|
||||
assertReady: (page: Page) => Promise<void>
|
||||
@@ -25,7 +25,7 @@ export async function captureObsidianDialogue(
|
||||
} catch (error) {
|
||||
const failurePath = screenshotPath.replace(/\.png$/u, ".failure.png");
|
||||
await page.screenshot({ path: failurePath, fullPage: true });
|
||||
console.error(`Dialogue failure screenshot: ${failurePath}`);
|
||||
console.error(`UI failure screenshot: ${failurePath}`);
|
||||
throw error;
|
||||
}
|
||||
await page.screenshot({ path: screenshotPath, fullPage: true });
|
||||
@@ -34,6 +34,14 @@ export async function captureObsidianDialogue(
|
||||
return screenshotPath;
|
||||
}
|
||||
|
||||
export async function captureObsidianDialogue(
|
||||
port: number,
|
||||
filename: string,
|
||||
assertReady: (page: Page) => Promise<void>
|
||||
): Promise<string> {
|
||||
return await captureObsidianPage(port, filename, assertReady);
|
||||
}
|
||||
|
||||
export async function captureJsonResolveDialogue(port: number): Promise<string> {
|
||||
return await captureObsidianDialogue(port, "hidden-file-json-resolve-dialogue.png", async (page) => {
|
||||
const optionAB = page.locator('label:has(input[name="disp"][value="AB"])');
|
||||
|
||||
Reference in New Issue
Block a user