UNPKG

4.29 kBTypeScriptView Raw
1import type { Options, Reporters } from '@wdio/types';
2import type { NormalizedPackageJson } from 'read-pkg-up';
3import type { BackendChoice, RegionOptions, CompilerOptions, ElectronBuildToolChoice, PMs } from './constants.js';
4export type PM = typeof PMs[number];
5export interface Questionnair {
6 runner: string;
7 preset?: string;
8 installTestingLibrary?: boolean;
9 electronAppBinaryPath?: string;
10 electronBuildTool?: ElectronBuildToolChoice;
11 electronBuilderConfigPath?: string;
12 backend?: BackendChoice;
13 hostname?: string;
14 port?: string;
15 path?: string;
16 expEnvAccessKey?: string;
17 expEnvHostname?: string;
18 expEnvPort?: string;
19 expEnvProtocol?: 'http' | 'https';
20 env_user?: string;
21 env_key?: string;
22 region?: RegionOptions;
23 useSauceConnect?: boolean;
24 framework: string;
25 specs?: string;
26 stepDefinitions?: string;
27 generateTestFiles: boolean;
28 usePageObjects?: boolean;
29 pages?: string;
30 isUsingCompiler: CompilerOptions;
31 reporters: string[];
32 services: string[];
33 serenityLibPath?: string;
34 plugins: string[];
35 outputDir?: string;
36 includeVisualTesting: boolean;
37 npmInstall: boolean;
38 createPackageJSON?: boolean;
39 projectRootCorrect?: boolean;
40 projectRoot?: string;
41 e2eEnvironment?: 'web' | 'mobile';
42 mobileEnvironment?: 'android' | 'ios';
43 browserEnvironment?: ('chrome' | 'firefox' | 'safari' | 'microsoftedge')[];
44}
45export interface ParsedAnswers extends Omit<Questionnair, 'runner' | 'framework' | 'reporters' | 'services' | 'plugins'> {
46 rawAnswers: Questionnair;
47 runner: 'local' | 'browser';
48 projectName: string;
49 framework: string;
50 purpose: string;
51 reporters: string[];
52 plugins: string[];
53 services: string[];
54 packagesToInstall: string[];
55 isUsingTypeScript: boolean;
56 isUsingBabel: boolean;
57 serenityAdapter: string | false;
58 esmSupport: boolean;
59 isSync: boolean;
60 _async: string;
61 _await: string;
62 projectRootDir: string;
63 destSpecRootPath: string;
64 destPageObjectRootPath: string;
65 destStepRootPath: string;
66 destSerenityLibRootPath: string;
67 relativePath: string;
68 hasRootTSConfig: boolean;
69 tsConfigFilePath: string;
70 tsProject: string;
71 wdioConfigPath: string;
72}
73export interface RunCommandArguments {
74 coverage?: boolean;
75 watch?: boolean;
76 hostname?: string;
77 port?: number;
78 path?: string;
79 user?: string;
80 key?: string;
81 logLevel?: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent';
82 bail?: number;
83 baseUrl?: string;
84 shard?: Options.ShardOptions;
85 waitforTimeout?: number;
86 framework?: string;
87 reporters?: Reporters.ReporterEntry[];
88 suite?: string[];
89 spec?: string[];
90 exclude?: string[];
91 mochaOpts?: WebdriverIO.MochaOpts;
92 jasmineOpts?: WebdriverIO.JasmineOpts;
93 cucumberOpts?: WebdriverIO.CucumberOpts;
94 autoCompileOpts?: Options.AutoCompileConfig;
95 configPath: string;
96 updateSnapshots?: Options.Testrunner['updateSnapshots'];
97 /**
98 * @internal
99 */
100 ignoredWorkerServices?: string[];
101}
102export interface ReplCommandArguments {
103 platformVersion: string;
104 deviceName: string;
105 udid: string;
106 option: string;
107 capabilities: string;
108}
109export interface InstallCommandArguments {
110 config?: string;
111 type: 'service' | 'reporter' | 'framework' | 'plugin';
112 name: string;
113}
114export interface ConfigCommandArguments {
115 yarn: boolean;
116 yes: boolean;
117 npmTag: string;
118}
119export interface SupportedPackage {
120 package: string;
121 short: string;
122 purpose: string;
123}
124export interface OnCompleteResult {
125 finished: number;
126 passed: number;
127 retries: number;
128 failed: number;
129}
130/** Extracted from @types/lodash@4.14.168 */
131export type ValueKeyIteratee<T> = ((value: T, key: string) => NotVoid) | IterateeShorthand<T>;
132type IterateeShorthand<T> = PropertyName | [PropertyName, any] | PartialShallow<T>;
133type PropertyName = string | number | symbol;
134type PartialShallow<T> = {
135 [P in keyof T]?: T[P] extends object ? object : T[P];
136};
137type NotVoid = unknown;
138export interface ProjectProps {
139 esmSupported: boolean;
140 path: string;
141 packageJson: NormalizedPackageJson;
142}
143export {};
144//# sourceMappingURL=types.d.ts.map
\No newline at end of file