@openfin/automation-helpers
Version:
Helper methods for automation testing in the OpenFin ecosystem
53 lines (52 loc) • 2.26 kB
TypeScript
import type OpenFin from "@openfin/core";
import { type ChildProcess } from "child_process";
/**
* Methods for OpenFin System object handling.
*/
export declare class OpenFinSystem {
/**
* Waits for the fin runtime to become available.
* @param timeoutMs The maximum time to wait for the fin runtime to be ready.
* @param intervalMs The amount of time between checks.
* @returns The runtime version.
*/
static waitForReady(timeoutMs?: number, intervalMs?: number): Promise<boolean>;
/**
* Launch a manifest.
* @param manifest The manifest to load.
* @param options The options for launching the manifest.
* @param options.runtimeVersion The runtimeVersion to use in the manifest, leave blank for default.
* @param options.realm The security realm to use, leave blank for no security realm.
* @returns True if the launch was successful.
*/
static launchManifest(manifest: string, options?: {
runtimeVersion?: string;
realm?: string;
}): Promise<boolean>;
/**
* Launch a manifest with overrides.
* @param manifest The manifest to load.
* @param manifestOverrides Data to override in the manifest.
* @param runtimeArgs Add, remove or replace runtime args.
* @returns True if the launch was successful.
*/
static launchManifestAdvanced(manifest: string, manifestOverrides: Partial<OpenFin.Manifest> | undefined, runtimeArgs?: {
arg: string;
op: "add" | "delete" | "replace";
value?: string;
}[]): Promise<boolean>;
/**
* Spawn a child and display the output.
* @param process The process to spawn.
* @param args The arguments for the app.
* @param options The options to launch with.
* @param options.shell Launch as shell with unsanitized args.
* @param hideOutput Hide the output.
* @param hideErrors Ignore errors in the output.
* @param endCallback Callback to call when the task completes.
* @returns The spawned process.
*/
static spawnWithOutput(process: string, args?: string[], options?: {
shell: boolean;
}, hideOutput?: boolean, hideErrors?: boolean, endCallback?: (output: string, error: string) => void): ChildProcess;
}