import { Page, Locator, TestType, PlaywrightTestArgs, PlaywrightTestOptions, PlaywrightWorkerArgs, PlaywrightWorkerOptions } from "@playwright/test"; /** * Loads the verification registry from verified-versions.json. */ export interface RegistryEntry { fvtt: string; system: string; systemVersion: string; status: "stable" | "incompatible" | "pending" | "failed"; notes?: string; } /** * Reads the library's `verified-versions.json` registry of confirmed * (Foundry x system) compatibility results. Works both inside this * repo and when `@thefehr/foundry-playwright` is installed as a * dependency — see {@link registryPathCandidates}. If a candidate exists * but is unreadable, contains invalid JSON, or doesn't parse to a valid * `RegistryEntry[]` shape, falls through to the next candidate instead of * giving up (e.g. a consumer project with a stale or malformed * `verified-versions.json` still gets the bundled registry). */ export declare function getVerificationRegistry(): RegistryEntry[]; /** * Bootstraps a Foundry VTT instance before all tests in a spec. * Reduces boilerplate in spec files. * @param test The Playwright test object. * @param config Foundry setup configuration. */ export declare function useFoundry(test: TestType, config?: Record): void; /** * Validates the current Foundry/System/Module stack against the registry. */ export declare function validateStack(page: Page, targetVersion?: string | number): Promise<"stable" | "incompatible" | "untested" | undefined>; /** * Aggressively removes Foundry VTT tours and overlays from the DOM and localStorage. * @param page The Playwright Page object. */ export declare function disableTour(page: Page): Promise; /** * Navigates to a specific tab by name or ID. * @param page The Playwright Page object. * @param tabName The logical name or data-tab value of the tab. */ export declare function switchTab(page: Page, tabName: string): Promise; /** * Navigates to the Systems tab and opens the installation dialog. * @param page The Playwright Page object. */ export declare function openSystemInstallDialog(page: Page): Promise; /** * Navigates to the Modules tab and opens the installation dialog. * @param page The Playwright Page object. */ export declare function openModuleInstallDialog(page: Page): Promise; /** * Installs a system from a manifest URL. * @param page The Playwright Page object. * @param manifestUrl The URL to the system.json manifest. */ export declare function installSystemFromManifest(page: Page, manifestUrl: string): Promise; /** * Installs a module from a manifest URL. * @param page The Playwright Page object. * @param manifestUrl The URL to the module.json manifest. */ export declare function installModuleFromManifest(page: Page, manifestUrl: string): Promise; /** * Waits for the Foundry VTT game object to be fully initialized and ready. * @param page The Playwright Page object. */ export declare function waitForReady(page: Page): Promise; /** * Gracefully shuts down the active world and returns the server to the Setup screen. * This utilizes the direct client API and must be executed within an authenticated GM session. */ export declare function shutdownWorldDirectly(page: Page): Promise; /** * Executes a function after ensuring a log has been emitted via FP_VERIFY. * @param page The Playwright Page object. * @param key The log key to wait for. * @param predicate A function to test the log data. * @param extraData Optional extra data to pass to the predicate. */ export declare function verifyResult(page: Page, key: string, predicate: (data: Record, extra?: unknown) => boolean, extraData?: unknown, options?: { timeout?: number; }): Promise; /** * Waits for a specific actor flag to be set to a value. */ export declare function waitForActorFlag(page: Page, actorName: string, flag: string, value: unknown): Promise; /** * Waits for specific actor data to be updated. */ export declare function waitForActorData(page: Page, actorName: string, path: string, value: unknown): Promise; /** * Waits for a game setting to be set. */ export declare function waitForSetting(page: Page, module: string, key: string, value: unknown): Promise; /** * Clears the FP_VERIFY log registry. */ export declare function clearFPVerify(page: Page): Promise; /** * Handles the Foundry VTT reload dialog. */ export declare function handleReload(page: Page): Promise; /** * Fills a field in a visible dialog. */ export declare function fillDialogField(page: Page, label: string, value: string): Promise; /** * Performs the full module activation flow for a list of modules. */ export declare function handleModuleActivationFlow(page: Page, moduleIds: string[]): Promise; /** * Simulates a drop from a compendium onto a target. */ export declare function dropCompendiumItem(page: Page, targetSelector: string, pack: string, itemId: string): Promise; /** * Simulates a Foundry VTT drag-and-drop event. */ export declare function simulateFoundryDrop(page: Page, targetSelector: string, data: Record): Promise;