theia-extension-tester
Version:
A testing library built on Selenium to test Eclipse Theia extensions / plugins. Eclipse Che is supported as well.
94 lines (93 loc) • 4.14 kB
TypeScript
/// <reference types="mocha" />
import { ITimeouts } from '@theia-extension-tester/base-browser';
import { logging } from '.';
export declare type StringDictionary = {
[key: string]: string;
};
declare const SupportedBrowsers: readonly ["chrome", "firefox", "edge", "opera", "safari"];
declare const SupportedAuthenticationMethods: readonly ["openshift"];
export declare type SupportedBrowser = typeof SupportedBrowsers[number];
export declare type SupportedAuthenticationMethod = typeof SupportedAuthenticationMethods[number];
declare type Option<T> = {
name: string;
shortName?: string;
valueName?: string;
description: string;
defaultValue: T;
};
export declare const URL_OPTION = "url";
export declare const BROWSER_OPTION = "browser";
export declare const DRIVER_OPTION = "driver";
export declare const CLEAN_OPTION = "clean";
export declare const LOG_OPTION = "log";
export declare const TIMEOUTS_OPTION = "timeouts";
export declare const QUERY_OPTION = "query";
export declare const FOLDER_OPTION = "folder";
export declare const COPY_FILES_OPTION = "copy-files";
export declare const MOCHA_OPTION = "mocha";
export declare const ENV_OPTION = "env";
export declare const TESTS_ARGUMENT = "tests";
export declare const AUTHENTICATION_OPTION = "authentication";
export declare const DEVFILE_ATTRIBUTES_OPTIONS = "devfile-attributes";
export declare const DEVFILE_ARGUMENT = "devfile";
export declare const URL_OPTION_METADATA: Option<string>;
export declare const BROWSER_OPTION_METADATA: Option<string>;
export declare const DRIVER_OPTION_METADATA: Option<undefined>;
export declare const CLEAN_OPTION_METADATA: Option<boolean>;
export declare const LOG_OPTION_METADATA: Option<string>;
export declare const TIMEOUTS_OPTION_METADATA: Option<string>;
export declare const QUERY_OPTION_METADATA: Option<string>;
export declare const FOLDER_OPTION_METADATA: Option<undefined>;
export declare const COPY_FILES_OPTION_METADATA: Option<Array<string>>;
export declare const ENV_OPTION_METADATA: Option<undefined>;
export declare const MOCHA_OPTION_METADATA: Option<string>;
export declare const AUTHENTICATION_OPTION_METADATA: Option<SupportedAuthenticationMethod>;
export declare const DEVFILE_ATTRIBUTES_OPTIONS_METADATA: Option<undefined>;
export interface BaseOptions {
[URL_OPTION]?: string;
[BROWSER_OPTION]?: string | SupportedBrowser;
[DRIVER_OPTION]?: string;
[CLEAN_OPTION]?: boolean;
[LOG_OPTION]?: logging.Level;
[TIMEOUTS_OPTION]?: ITimeouts | string;
[MOCHA_OPTION]?: Mocha.MochaOptions | string;
[ENV_OPTION]?: string;
[TESTS_ARGUMENT]: Array<string>;
}
export interface BaseStrictOptions {
[URL_OPTION]: string;
[BROWSER_OPTION]: string | SupportedBrowser;
[DRIVER_OPTION]?: string;
[CLEAN_OPTION]: boolean;
[LOG_OPTION]: logging.Level;
[TIMEOUTS_OPTION]: ITimeouts | string;
[MOCHA_OPTION]: Mocha.MochaOptions | string;
[ENV_OPTION]?: string;
[TESTS_ARGUMENT]: Array<string>;
}
export interface TheiaOptions extends BaseOptions {
[QUERY_OPTION]?: string | StringDictionary;
[FOLDER_OPTION]?: string;
[COPY_FILES_OPTION]?: string[];
}
export interface TheiaStrictOptions extends BaseStrictOptions {
[QUERY_OPTION]: string | StringDictionary;
[FOLDER_OPTION]?: string;
[COPY_FILES_OPTION]?: string[];
}
export interface CheOptions extends BaseOptions {
[DEVFILE_ATTRIBUTES_OPTIONS]?: string | StringDictionary;
[AUTHENTICATION_OPTION]?: string;
[DEVFILE_ARGUMENT]: string;
}
export interface CheStrictOptions extends BaseStrictOptions {
[DEVFILE_ATTRIBUTES_OPTIONS]?: string | StringDictionary;
[AUTHENTICATION_OPTION]: string;
[DEVFILE_ARGUMENT]: string;
}
export declare const BASE_DEFAULT_OPTIONS: BaseStrictOptions;
export declare const THEIA_DEFAULT_OPTIONS: TheiaStrictOptions;
export declare const CHE_DEFAULT_OPTIONS: CheStrictOptions;
export declare function optionToCli(option: Option<any>, replaceDictionary: StringDictionary): [string, string, string | undefined];
export declare function isAuthenticationOptionSupported(options: CheStrictOptions): boolean;
export {};