create-wdio 9.0.0 → 9.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -7
- package/assets/demo.gif +0 -0
- package/build/cli/config.d.ts +51 -0
- package/build/cli/config.d.ts.map +1 -0
- package/build/cli/install.d.ts +12 -0
- package/build/cli/install.d.ts.map +1 -0
- package/build/cli/utils.d.ts +18 -0
- package/build/cli/utils.d.ts.map +1 -0
- package/build/config/cli.d.ts +2 -0
- package/build/config/cli.d.ts.map +1 -0
- package/build/config/cli.js +1632 -0
- package/build/constants.d.ts +248 -0
- package/build/constants.d.ts.map +1 -0
- package/build/index.d.ts +4 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +1018 -54
- package/build/install/cli.d.ts +2 -0
- package/build/install/cli.d.ts.map +1 -0
- package/build/install/cli.js +1719 -0
- package/build/install.d.ts +4 -0
- package/build/install.d.ts.map +1 -0
- package/build/templates/EjsHelpers.d.ts +18 -0
- package/build/templates/EjsHelpers.d.ts.map +1 -0
- package/build/templates/exampleFiles/browser/Component.css.ejs +121 -0
- package/build/templates/exampleFiles/browser/Component.lit.ejs +154 -0
- package/build/templates/exampleFiles/browser/Component.lit.test.ejs +24 -0
- package/build/templates/exampleFiles/browser/Component.preact.ejs +28 -0
- package/build/templates/exampleFiles/browser/Component.preact.test.ejs +59 -0
- package/build/templates/exampleFiles/browser/Component.react.ejs +29 -0
- package/build/templates/exampleFiles/browser/Component.react.test.ejs +58 -0
- package/build/templates/exampleFiles/browser/Component.solid.ejs +28 -0
- package/build/templates/exampleFiles/browser/Component.solid.test.ejs +58 -0
- package/build/templates/exampleFiles/browser/Component.stencil.ejs +43 -0
- package/build/templates/exampleFiles/browser/Component.stencil.test.ejs +45 -0
- package/build/templates/exampleFiles/browser/Component.svelte.ejs +47 -0
- package/build/templates/exampleFiles/browser/Component.svelte.test.ejs +58 -0
- package/build/templates/exampleFiles/browser/Component.vue.ejs +34 -0
- package/build/templates/exampleFiles/browser/Component.vue.test.ejs +62 -0
- package/build/templates/exampleFiles/browser/standalone.test.ejs +13 -0
- package/build/templates/exampleFiles/cucumber/features/login.feature +12 -0
- package/build/templates/exampleFiles/cucumber/step_definitions/steps.js.ejs +55 -0
- package/build/templates/exampleFiles/mochaJasmine/test.e2e.js.ejs +11 -0
- package/build/templates/exampleFiles/pageobjects/login.page.js.ejs +45 -0
- package/build/templates/exampleFiles/pageobjects/page.js.ejs +17 -0
- package/build/templates/exampleFiles/pageobjects/secure.page.js.ejs +20 -0
- package/build/templates/exampleFiles/serenity-js/common/config/serenity.properties.ejs +1 -0
- package/build/templates/exampleFiles/serenity-js/common/serenity/github-api/GitHubStatus.ts.ejs +41 -0
- package/build/templates/exampleFiles/serenity-js/common/serenity/todo-list-app/TodoList.ts.ejs +100 -0
- package/build/templates/exampleFiles/serenity-js/common/serenity/todo-list-app/TodoListItem.ts.ejs +36 -0
- package/build/templates/exampleFiles/serenity-js/cucumber/step-definitions/steps.ts.ejs +37 -0
- package/build/templates/exampleFiles/serenity-js/cucumber/support/parameter.config.ts.ejs +18 -0
- package/build/templates/exampleFiles/serenity-js/cucumber/todo-list/completing_items.feature.ejs +23 -0
- package/build/templates/exampleFiles/serenity-js/cucumber/todo-list/narrative.md.ejs +17 -0
- package/build/templates/exampleFiles/serenity-js/jasmine/example.spec.ts.ejs +86 -0
- package/build/templates/exampleFiles/serenity-js/mocha/example.spec.ts.ejs +88 -0
- package/build/templates/snippets/afterTest.ejs +20 -0
- package/build/templates/snippets/capabilities.ejs +57 -0
- package/build/templates/snippets/cucumber.ejs +50 -0
- package/build/templates/snippets/electronTest.js.ejs +7 -0
- package/build/templates/snippets/jasmine.ejs +20 -0
- package/build/templates/snippets/macosTest.js.ejs +11 -0
- package/build/templates/snippets/mocha.ejs +14 -0
- package/build/templates/snippets/reporters.ejs +14 -0
- package/build/templates/snippets/serenity.ejs +18 -0
- package/build/templates/snippets/services.ejs +18 -0
- package/build/templates/snippets/testWithPO.js.ejs +22 -0
- package/build/templates/snippets/testWithoutPO.js.ejs +19 -0
- package/build/templates/snippets/vscodeTest.js.ejs +9 -0
- package/build/templates/wdio.conf.tpl.ejs +412 -0
- package/build/types.d.ts +99 -0
- package/build/types.d.ts.map +1 -0
- package/build/utils/index.d.ts +2 -0
- package/build/utils/index.d.ts.map +1 -0
- package/build/utils/index.js +849 -0
- package/build/utils.d.ts +78 -0
- package/build/utils.d.ts.map +1 -0
- package/package.json +60 -41
- package/.eslintrc.cjs +0 -37
- package/__mocks__/commander.ts +0 -18
- package/build/constants.js +0 -51
- package/build/types.js +0 -1
- package/build/utils.js +0 -38
- package/vitest.config.ts +0 -23
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
WebdriverIO Starter Toolkit [](https://github.com/webdriverio/webdriverio/blob/main/CONTRIBUTING.md)
|
|
2
2
|
===========================
|
|
3
3
|
|
|
4
4
|
<img alt="Logo" align="right" src="https://webdriver.io/assets/images/robot-3677788dd63849c56aa5cb3f332b12d5.svg" width="20%" />
|
|
@@ -9,11 +9,11 @@ One command to create a fresh WebdriverIO project or add WebdriverIO to an exist
|
|
|
9
9
|
- [Supported Options](#supported-options) - command line parameters
|
|
10
10
|
|
|
11
11
|
`create-wdio` works on macOS, Windows, and Linux.<br>
|
|
12
|
-
If something doesn’t work, please [file an issue](https://github.com/webdriverio/
|
|
13
|
-
If you have questions or need help, please ask in our [
|
|
12
|
+
If something doesn’t work, please [file an issue](https://github.com/webdriverio/webdriverio/issues/new).<br>
|
|
13
|
+
If you have questions or need help, please ask in our [Discord Support channel](https://discord.webdriver.io).
|
|
14
14
|
|
|
15
15
|
<p align="center">
|
|
16
|
-
<img src="https://raw.githubusercontent.com/webdriverio/
|
|
16
|
+
<img src="https://raw.githubusercontent.com/webdriverio/webdriverio/main/packages/create-wdio/assets/demo.gif" alt="Example" />
|
|
17
17
|
</p>
|
|
18
18
|
|
|
19
19
|
## Usage
|
|
@@ -34,7 +34,7 @@ _[`npx`](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f
|
|
|
34
34
|
npm init wdio@latest ./e2e
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
_[`npm init <initializer>`](https://docs.npmjs.com/cli/
|
|
37
|
+
_[`npm init <initializer>`](https://docs.npmjs.com/cli/v10/commands/npm-init) is available in npm 6+_
|
|
38
38
|
|
|
39
39
|
#### yarn
|
|
40
40
|
|
|
@@ -44,6 +44,13 @@ yarn create wdio@latest ./e2e
|
|
|
44
44
|
|
|
45
45
|
_[`yarn create <starter-kit-package>`](https://yarnpkg.com/lang/en/docs/cli/create/) is available in Yarn 0.25+_
|
|
46
46
|
|
|
47
|
+
#### pnpm
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
pnpm create wdio ./e2e
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
_[`pnpm create <starter-kit-package>`](https://pnpm.io/cli/create) is available in pnpm v7+_
|
|
47
54
|
|
|
48
55
|
It will create a directory called `e2e` inside the current folder.
|
|
49
56
|
Then it will run the configuration wizard that will help you set-up your framework.
|
|
@@ -55,9 +62,7 @@ You can pass the following command line flags to modify the bootstrap mechanism:
|
|
|
55
62
|
|
|
56
63
|
* `--dev` - Install all packages as `devDependencies` (default: `true`)
|
|
57
64
|
* `--yes` - Will fill in all config defaults without prompting (default: `false`)
|
|
58
|
-
* `--use-yarn` - yes, we support yarn too! (default: `true`)
|
|
59
65
|
* `--npm-tag` - use a specific NPM tag for `@wdio/cli` package (default: `latest`)
|
|
60
|
-
* `--verbose` - print additional logs (default: `false`)
|
|
61
66
|
|
|
62
67
|
----
|
|
63
68
|
|
package/assets/demo.gif
ADDED
|
Binary file
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { Argv } from 'yargs';
|
|
2
|
+
import { runConfigCommand } from './utils.js';
|
|
3
|
+
import type { ConfigCommandArguments } from '../types.js';
|
|
4
|
+
export declare const command = "config";
|
|
5
|
+
export declare const desc = "Initialize WebdriverIO and setup configuration in your current project.";
|
|
6
|
+
export declare const cmdArgs: {
|
|
7
|
+
readonly yarn: {
|
|
8
|
+
readonly type: "boolean";
|
|
9
|
+
readonly desc: "Install packages via Yarn package manager.";
|
|
10
|
+
readonly default: boolean;
|
|
11
|
+
};
|
|
12
|
+
readonly yes: {
|
|
13
|
+
readonly alias: "y";
|
|
14
|
+
readonly desc: "will fill in all config defaults without prompting";
|
|
15
|
+
readonly type: "boolean";
|
|
16
|
+
readonly default: false;
|
|
17
|
+
};
|
|
18
|
+
readonly npmTag: {
|
|
19
|
+
readonly alias: "t";
|
|
20
|
+
readonly desc: "define NPM tag to use for WebdriverIO related packages";
|
|
21
|
+
readonly type: "string";
|
|
22
|
+
readonly default: "latest";
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export declare const builder: (yargs: Argv) => Argv<import("yargs").Omit<{}, "yarn" | "yes" | "npmTag"> & import("yargs").InferredOptionTypes<{
|
|
26
|
+
readonly yarn: {
|
|
27
|
+
readonly type: "boolean";
|
|
28
|
+
readonly desc: "Install packages via Yarn package manager.";
|
|
29
|
+
readonly default: boolean;
|
|
30
|
+
};
|
|
31
|
+
readonly yes: {
|
|
32
|
+
readonly alias: "y";
|
|
33
|
+
readonly desc: "will fill in all config defaults without prompting";
|
|
34
|
+
readonly type: "boolean";
|
|
35
|
+
readonly default: false;
|
|
36
|
+
};
|
|
37
|
+
readonly npmTag: {
|
|
38
|
+
readonly alias: "t";
|
|
39
|
+
readonly desc: "define NPM tag to use for WebdriverIO related packages";
|
|
40
|
+
readonly type: "string";
|
|
41
|
+
readonly default: "latest";
|
|
42
|
+
};
|
|
43
|
+
}>>;
|
|
44
|
+
export declare function handler(argv: ConfigCommandArguments, runConfigCmd?: typeof runConfigCommand): Promise<{
|
|
45
|
+
success: boolean;
|
|
46
|
+
parsedAnswers: import("../types.js").ParsedAnswers;
|
|
47
|
+
installedPackages: string[];
|
|
48
|
+
}>;
|
|
49
|
+
export { missingConfigurationPrompt, canAccessConfigPath } from './utils.js';
|
|
50
|
+
export { formatConfigFilePaths } from '../utils.js';
|
|
51
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/cli/config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAIjC,OAAO,EAEH,gBAAgB,EACnB,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAUzD,eAAO,MAAM,OAAO,WAAW,CAAA;AAC/B,eAAO,MAAM,IAAI,4EAA4E,CAAA;AAE7F,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;CAkBV,CAAA;AAEV,eAAO,MAAM,OAAO,GAAI,OAAO,IAAI;;;;;;;;;;;;;;;;;;GAKlC,CAAA;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,sBAAsB,EAAE,YAAY,0BAAmB;;;;GAQ1F;AAED,OAAO,EAAE,0BAA0B,EAAE,mBAAmB,EAAG,MAAM,YAAY,CAAA;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Argv } from 'yargs';
|
|
2
|
+
import type { InstallCommandArguments } from '../types.js';
|
|
3
|
+
export declare const command = "install <type> <name>";
|
|
4
|
+
export declare const desc: string;
|
|
5
|
+
export declare const cmdArgs: {
|
|
6
|
+
readonly config: {
|
|
7
|
+
readonly desc: "Location of your WDIO configuration (default: wdio.conf.(js|ts|cjs|mjs))";
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export declare const builder: (yargs: Argv) => Argv<{}>;
|
|
11
|
+
export declare function handler(argv: InstallCommandArguments): Promise<void>;
|
|
12
|
+
//# sourceMappingURL=install.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/cli/install.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAcjC,OAAO,KAAK,EAAE,uBAAuB,EAAoB,MAAM,aAAa,CAAA;AAW5E,eAAO,MAAM,OAAO,0BAA0B,CAAA;AAC9C,eAAO,MAAM,IAAI,QAIN,CAAA;AAEX,eAAO,MAAM,OAAO;;;;CAIV,CAAA;AAEV,eAAO,MAAM,OAAO,GAAI,OAAO,IAAI,aAalC,CAAA;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,uBAAuB,iBAiF1D"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ParsedAnswers } from '../types.js';
|
|
2
|
+
export declare function runConfigCommand(parsedAnswers: ParsedAnswers, npmTag: string): Promise<void>;
|
|
3
|
+
/**
|
|
4
|
+
* Helper utility used in `run` and `install` command to create config if none exist
|
|
5
|
+
* @param {string} command to be executed by user
|
|
6
|
+
* @param {string} configPath the path to a wdio.conf.[js/ts] file
|
|
7
|
+
* @param {Function} runConfigCmd runConfig method to be replaceable for unit testing
|
|
8
|
+
*/
|
|
9
|
+
export declare function missingConfigurationPrompt(command: string, configPath: string, runConfigCmd?: Function): Promise<string>;
|
|
10
|
+
export declare const parseAnswers: (yes: boolean) => Promise<ParsedAnswers>;
|
|
11
|
+
/**
|
|
12
|
+
* Helper utility used in `run` and `install` command to check whether a config file currently exists
|
|
13
|
+
* @param configPathNoExtension the file path to the WDIO config file without extension
|
|
14
|
+
* @param configPath the file path to the WDIO config file that is checked first if set
|
|
15
|
+
* @returns {string} the path to the config file that exists, otherwise undefined
|
|
16
|
+
*/
|
|
17
|
+
export declare function canAccessConfigPath(configPathNoExtension: string, configPath?: string): Promise<string | undefined>;
|
|
18
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/cli/utils.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAGhD,wBAAsB,gBAAgB,CAAC,aAAa,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,iBAqBlF;AAED;;;;;GAKG;AACH,wBAAsB,0BAA0B,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,GAAE,QAA2B,mBA+B9H;AAED,eAAO,MAAM,YAAY,GAAmB,KAAK,OAAO,KAAG,OAAO,CAAC,aAAa,CAyF/E,CAAA;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,qBAAqB,EAAC,MAAM,EAAE,UAAU,CAAC,EAAC,MAAM,GAAG,OAAO,CAAC,MAAM,GAAC,SAAS,CAAC,CAcrH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/config/cli.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAA"}
|