@wdio/cli 8.14.2 → 8.14.3
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/build/commands/config.d.ts.map +1 -1
- package/build/commands/config.js +4 -3
- package/build/constants.d.ts +70 -576
- package/build/constants.d.ts.map +1 -1
- package/build/constants.js +91 -80
- package/build/templates/exampleFiles/cucumber/step_definitions/steps.js.ejs +3 -0
- package/build/templates/exampleFiles/pageobjects/login.page.js.ejs +3 -2
- package/build/templates/exampleFiles/pageobjects/page.js.ejs +4 -0
- package/build/templates/exampleFiles/pageobjects/secure.page.js.ejs +3 -2
- package/build/templates/snippets/capabilities.ejs +3 -1
- package/build/templates/snippets/services.ejs +12 -1
- package/build/templates/snippets/testWithPO.js.ejs +3 -3
- package/build/templates/snippets/testWithoutPO.js.ejs +4 -3
- package/build/templates/snippets/vscodeTest.js.ejs +1 -1
- package/build/types.d.ts +5 -4
- package/build/types.d.ts.map +1 -1
- package/build/utils.d.ts +2 -1
- package/build/utils.d.ts.map +1 -1
- package/build/utils.js +4 -4
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/commands/config.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAQjC,OAAO,KAAK,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAIxE,eAAO,MAAM,OAAO,WAAW,CAAA;AAC/B,eAAO,MAAM,IAAI,4EAA4E,CAAA;AAE7F,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;CAkBV,CAAA;AAEV,eAAO,MAAM,OAAO,UAAW,IAAI;;;;;;;;;;;;;;;;;;GAKlC,CAAA;AAED,eAAO,MAAM,YAAY,QAAwB,OAAO,KAAG,QAAQ,aAAa,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/commands/config.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAQjC,OAAO,KAAK,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAIxE,eAAO,MAAM,OAAO,WAAW,CAAA;AAC/B,eAAO,MAAM,IAAI,4EAA4E,CAAA;AAE7F,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;CAkBV,CAAA;AAEV,eAAO,MAAM,OAAO,UAAW,IAAI;;;;;;;;;;;;;;;;;;GAKlC,CAAA;AAED,eAAO,MAAM,YAAY,QAAwB,OAAO,KAAG,QAAQ,aAAa,CAoF/E,CAAA;AAED,wBAAsB,gBAAgB,CAAC,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,iBAoBpG;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,sBAAsB,EAAE,YAAY,0BAAmB;;;;GAQ1F;AAED;;;;GAIG;AACH,wBAAsB,qBAAqB,CAAC,MAAM,EAAE,MAAM;;;GAMzD;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,UAAU,EAAE,MAAM,oBAc3D;AAED;;;;;;GAMG;AACH,wBAAsB,0BAA0B,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,UAAQ,EAAE,YAAY,0BAAmB,8BA4BrI"}
|
package/build/commands/config.js
CHANGED
|
@@ -2,7 +2,7 @@ import fs from 'node:fs/promises';
|
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import util from 'node:util';
|
|
4
4
|
import inquirer from 'inquirer';
|
|
5
|
-
import { CONFIG_HELPER_INTRO, CLI_EPILOGUE,
|
|
5
|
+
import { CONFIG_HELPER_INTRO, CLI_EPILOGUE, CompilerOptions, SUPPORTED_PACKAGES, CONFIG_HELPER_SUCCESS_MESSAGE, isNuxtProject } from '../constants.js';
|
|
6
6
|
import { convertPackageHashToObject, getAnswers, getPathForFileGeneration, getProjectProps, getProjectRoot, createPackageJSON, setupTypeScript, setupBabel, npmInstall, createWDIOConfig, createWDIOScript, runAppiumInstaller } from '../utils.js';
|
|
7
7
|
const hasYarnLock = await fs.access('yarn.lock').then(() => true, () => false);
|
|
8
8
|
export const command = 'config';
|
|
@@ -73,7 +73,7 @@ export const parseAnswers = async function (yes) {
|
|
|
73
73
|
*/
|
|
74
74
|
: path.resolve(projectRootDir, `tsconfig.${runnerPackage.short === 'local' ? 'e2e' : 'wdio'}.json`);
|
|
75
75
|
const parsedPaths = getPathForFileGeneration(answers, projectRootDir);
|
|
76
|
-
const isUsingTypeScript = answers.isUsingCompiler ===
|
|
76
|
+
const isUsingTypeScript = answers.isUsingCompiler === CompilerOptions.TS;
|
|
77
77
|
const wdioConfigFilename = `wdio.conf.${isUsingTypeScript ? 'ts' : 'js'}`;
|
|
78
78
|
const wdioConfigPath = path.resolve(projectRootDir, wdioConfigFilename);
|
|
79
79
|
return {
|
|
@@ -83,6 +83,7 @@ export const parseAnswers = async function (yes) {
|
|
|
83
83
|
installTestingLibrary: false
|
|
84
84
|
}),
|
|
85
85
|
...answers,
|
|
86
|
+
useSauceConnect: isNuxtProject || answers.useSauceConnect,
|
|
86
87
|
rawAnswers: answers,
|
|
87
88
|
runner: runnerPackage.short,
|
|
88
89
|
preset: presetPackage.short,
|
|
@@ -95,7 +96,7 @@ export const parseAnswers = async function (yes) {
|
|
|
95
96
|
stepDefinitions: answers.stepDefinitions && `./${path.relative(projectRootDir, answers.stepDefinitions).replaceAll(path.sep, '/')}`,
|
|
96
97
|
packagesToInstall,
|
|
97
98
|
isUsingTypeScript,
|
|
98
|
-
isUsingBabel: answers.isUsingCompiler ===
|
|
99
|
+
isUsingBabel: answers.isUsingCompiler === CompilerOptions.Babel,
|
|
99
100
|
esmSupport: projectProps && !(projectProps.esmSupported) ? false : true,
|
|
100
101
|
isSync: false,
|
|
101
102
|
_async: 'async ',
|