UNPKG

4.22 kBTypeScriptView Raw
1import type { Options, Reporters } from '@wdio/types';
2import type { NormalizedPackageJson } from 'read-pkg-up';
3import type { BackendChoice, RegionOptions, 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 isUsingTypeScript: boolean;
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 serenityAdapter: string | false;
57 esmSupport: boolean;
58 isSync: boolean;
59 _async: string;
60 _await: string;
61 projectRootDir: string;
62 destSpecRootPath: string;
63 destPageObjectRootPath: string;
64 destStepRootPath: string;
65 destSerenityLibRootPath: string;
66 relativePath: string;
67 hasRootTSConfig: boolean;
68 tsConfigFilePath: string;
69 tsProject: string;
70 wdioConfigPath: string;
71}
72export interface RunCommandArguments {
73 coverage?: boolean;
74 watch?: boolean;
75 hostname?: string;
76 port?: number;
77 path?: string;
78 user?: string;
79 key?: string;
80 logLevel?: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent';
81 bail?: number;
82 baseUrl?: string;
83 shard?: Options.ShardOptions;
84 waitforTimeout?: number;
85 framework?: string;
86 reporters?: Reporters.ReporterEntry[];
87 suite?: string[];
88 spec?: string[];
89 exclude?: string[];
90 mochaOpts?: WebdriverIO.MochaOpts;
91 jasmineOpts?: WebdriverIO.JasmineOpts;
92 cucumberOpts?: WebdriverIO.CucumberOpts;
93 configPath: string;
94 updateSnapshots?: Options.Testrunner['updateSnapshots'];
95 tsConfigPath?: string;
96 /**
97 * @internal
98 */
99 ignoredWorkerServices?: string[];
100}
101export interface ReplCommandArguments {
102 platformVersion: string;
103 deviceName: string;
104 udid: string;
105 option: string;
106 capabilities: string;
107}
108export interface InstallCommandArguments {
109 config?: string;
110 type: 'service' | 'reporter' | 'framework' | 'plugin';
111 name: string;
112}
113export interface ConfigCommandArguments {
114 yarn: boolean;
115 yes: boolean;
116 npmTag: string;
117}
118export interface SupportedPackage {
119 package: string;
120 short: string;
121 purpose: string;
122}
123export interface OnCompleteResult {
124 finished: number;
125 passed: number;
126 retries: number;
127 failed: number;
128}
129/** Extracted from @types/lodash@4.14.168 */
130export type ValueKeyIteratee<T> = ((value: T, key: string) => NotVoid) | IterateeShorthand<T>;
131type IterateeShorthand<T> = PropertyName | [PropertyName, any] | PartialShallow<T>;
132type PropertyName = string | number | symbol;
133type PartialShallow<T> = {
134 [P in keyof T]?: T[P] extends object ? object : T[P];
135};
136type NotVoid = unknown;
137export interface ProjectProps {
138 esmSupported: boolean;
139 path: string;
140 packageJson: NormalizedPackageJson;
141}
142export {};
143//# sourceMappingURL=types.d.ts.map
\No newline at end of file