mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-10-21 16:52:32 +00:00
Harden real-runtime workflow validation
This commit is contained in:
@@ -38,7 +38,12 @@ export function modalByTitle(page: Page, title: string): Locator {
|
||||
}
|
||||
|
||||
export async function captureGuideDialogue(port: number, filename: string, title: string): Promise<string> {
|
||||
return await captureObsidianElement(port, filename, (page) => modalByTitle(page, title).locator(".modal").first());
|
||||
return await captureObsidianElement(
|
||||
port,
|
||||
filename,
|
||||
(page) => modalByTitle(page, title).locator(".modal").first(),
|
||||
uiTimeoutMs
|
||||
);
|
||||
}
|
||||
|
||||
export async function assertVerticalActionLayout(port: number, title: string): Promise<void> {
|
||||
@@ -182,16 +187,16 @@ export async function captureAndStartInitialisation(
|
||||
? "Setup Complete: Preparing This P2P Device"
|
||||
: p2pAdditionalDevice
|
||||
? "Setup Complete: Preparing to Fetch from Another Device"
|
||||
: mode === "new"
|
||||
? "Setup Complete: Preparing to Initialise Server"
|
||||
: "Setup Complete: Preparing to Fetch Synchronisation Data";
|
||||
: mode === "new"
|
||||
? "Setup Complete: Preparing to Initialise Server"
|
||||
: "Setup Complete: Preparing to Fetch Synchronisation Data";
|
||||
const button = p2pFirstDevice
|
||||
? "Restart and Prepare This Device"
|
||||
: p2pAdditionalDevice
|
||||
? "Restart and Select Source Device"
|
||||
: mode === "new"
|
||||
? "Restart and Initialise Server"
|
||||
: "Restart and Fetch Data";
|
||||
: mode === "new"
|
||||
? "Restart and Initialise Server"
|
||||
: "Restart and Fetch Data";
|
||||
if (p2pAdditionalDevice) {
|
||||
await withObsidianPage(port, async (page) => {
|
||||
const modal = modalByTitle(page, title);
|
||||
|
||||
Reference in New Issue
Block a user