import { Application } from 'spectron'; import * as Common from './common'; import * as ReplExpect from './repl-expect'; export interface AppAndCount { app: Application; count: number; splitIndex?: number; } export declare const expectSubset: (struct1: object, failFast?: boolean) => (str: string) => boolean; /** is the given struct2 the same as the given struct2 (given as a string) */ export declare const expectStruct: (struct1: object, noParse?: boolean, failFast?: boolean) => (str: string) => boolean; export declare const expectYAML: (struct1: object, subset?: boolean, failFast?: boolean) => (str: string) => boolean; export declare const expectYAMLSubset: (struct1: object, failFast?: boolean) => (str: string) => boolean; /** is the given actual array the same as the given expected array? */ export declare const expectArray: (expected: Array, failFast?: boolean, subset?: boolean) => (actual: string | Array) => boolean; /** Expand the fold on the given line of a monaco editor */ export declare function clickToExpandMonacoFold(res: AppAndCount, lineIdx: number): Promise; /** get the monaco editor text */ export declare const getValueFromMonaco: (res: AppAndCount, container?: string) => Promise; export declare const waitForXtermInput: (app: Application, N: number) => Promise; export declare const expectText: (app: Application, expectedText: string, exact?: boolean, timeout?: number) => (selector: string) => Promise; /** @return the current number of tabs */ export declare function tabCount(app: Application): Promise; /** Close all except the first tab */ export declare function closeAllExceptFirstTab(this: Common.ISuite, expectedInitialNTabs?: number): void; export declare function uniqueFileForSnapshot(): string; /** Click the specified button action button */ export declare function clickBlockActionButton(res: AppAndCount, buttonSelector: string): Promise; /** Click the close button on a block, and expect it to be gone */ export declare function removeBlock(res: AppAndCount): Promise; /** Click the block copy button */ export declare function copyBlockLink(res: AppAndCount): Promise; /** Click the block run button */ export declare function rerunCommand(res: AppAndCount): Promise; /** Switch sidecar tab */ export declare function switchToTab(mode: string): (res: AppAndCount) => Promise; /** Output of the given block */ export declare function outputOf(res: AppAndCount): Promise; /** * Execute `command` and expect a table with `name` * */ export declare function doList(ctx: Common.ISuite, command: string, name: string): Promise; export declare function openSidecarByClick(ctx: Common.ISuite, selector: string, name: string, mode?: string, activationId?: string, splitIndex?: number, // after we click, we expect two splits inNotebook?: boolean): Promise; /** * Execute `command` and expect a table with `name`, * and then open sidecar by clicking the `name` * */ export declare function listAndOpenSidecarNoWait(ctx: Common.ISuite, command: string, name: string, mode?: string): Promise; /** * Click sidecar mode button by `mode` * */ export declare function clickSidecarModeButton(ctx: Common.ISuite, res: AppAndCount, mode: string): Promise; /** * Click a sidecar button with `selector` * */ export declare function clickSidecarButtonCustomized(ctx: Common.ISuite, res: AppAndCount, selector: string): Promise; export declare function doCancel(this: Common.ISuite, cmd?: string): Promise; export declare function switchToTopLevelTabViaClick(ctx: Common.ISuite, N: number): Promise; export declare function doClear(this: Common.ISuite, residualBlockCount?: number, splitIndex?: number): Promise; export declare function clickNewTabButton(ctx: Common.ISuite, expectedNewTabIndex: number): Promise; export declare function getTabTitle(ctx: Common.ISuite, tabTitleSelector: string): Promise; export declare function expectCurrentTabTitle(ctx: Common.ISuite, expectedTabTitle: string, tabTitleSelector?: string): Promise;