1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/integration/helpers/client.ts
Sebastian Malton 81ed697313 add debug statemets to integration tests
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2021-02-05 16:56:30 -05:00

38 lines
1.1 KiB
TypeScript

import { SpectronClient } from "spectron";
export async function click(client: SpectronClient, ...args: any[]): Promise<void> {
console.debug("click", { args });
await client.click(...args);
}
export async function waitUntilTextExists(client: SpectronClient, ...args: any[]): Promise<void> {
console.debug("waitUntilTextExists", { args });
await (client.waitUntilTextExists as any)(...args);
}
export async function waitForExist(client: SpectronClient, ...args: any[]): Promise<void> {
console.debug("waitForExist", { args });
await (client.waitForExist as any)(...args);
}
export async function waitForEnabled(client: SpectronClient, ...args: any[]): Promise<void> {
console.debug("waitForEnabled", { args });
await (client.waitForEnabled as any)(...args);
}
export async function waitForVisible(client: SpectronClient, ...args: any[]): Promise<void> {
console.debug("waitForVisible", { args });
await (client.waitForVisible as any)(...args);
}
export async function send(ipc: Electron.IpcRenderer, ...args: any[]): Promise<void> {
console.debug("send", { args });
await (ipc.send as any)(...args);
}