@wdio/cli 8.8.8 → 8.10.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/build/commands/config.d.ts.map +1 -1
- package/build/commands/config.js +2 -1
- package/build/constants.d.ts +8 -8
- package/build/constants.d.ts.map +1 -1
- package/build/constants.js +37 -17
- package/build/templates/exampleFiles/cucumber/step_definitions/steps.js.ejs +2 -2
- package/build/templates/exampleFiles/jasmine/example.e2e.js.ejs +2 -2
- package/build/templates/exampleFiles/mocha/example.e2e.js.ejs +2 -2
- package/build/templates/exampleFiles/pageobjects/login.page.js.ejs +1 -1
- package/build/templates/exampleFiles/pageobjects/secure.page.js.ejs +1 -1
- package/build/templates/reporters.ejs +8 -8
- package/build/templates/wdio.conf.tpl.ejs +18 -13
- package/build/types.d.ts +1 -0
- package/build/types.d.ts.map +1 -1
- package/build/utils.d.ts +1 -0
- package/build/utils.d.ts.map +1 -1
- package/build/utils.js +21 -5
- package/package.json +7 -7
|
@@ -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,CAkF/E,CAAA;AAED,wBAAsB,gBAAgB,CAAC,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,
|
|
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,CAkF/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,oBAO3D;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
|
@@ -3,7 +3,7 @@ import path from 'node:path';
|
|
|
3
3
|
import util from 'node:util';
|
|
4
4
|
import inquirer from 'inquirer';
|
|
5
5
|
import { CONFIG_HELPER_INTRO, CLI_EPILOGUE, COMPILER_OPTIONS, SUPPORTED_PACKAGES, CONFIG_HELPER_SUCCESS_MESSAGE } from '../constants.js';
|
|
6
|
-
import { convertPackageHashToObject, getAnswers, getPathForFileGeneration, getProjectProps, getProjectRoot, createPackageJSON, setupTypeScript, setupBabel, npmInstall, createWDIOConfig, createWDIOScript } from '../utils.js';
|
|
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';
|
|
9
9
|
export const desc = 'Initialize WebdriverIO and setup configuration in your current project.';
|
|
@@ -121,6 +121,7 @@ export async function runConfigCommand(parsedAnswers, useYarn, npmTag) {
|
|
|
121
121
|
* print success message
|
|
122
122
|
*/
|
|
123
123
|
console.log(util.format(CONFIG_HELPER_SUCCESS_MESSAGE, parsedAnswers.projectRootDir, parsedAnswers.projectRootDir));
|
|
124
|
+
await runAppiumInstaller(parsedAnswers);
|
|
124
125
|
}
|
|
125
126
|
export async function handler(argv, runConfigCmd = runConfigCommand) {
|
|
126
127
|
const parsedAnswers = await parseAnswers(argv.yes);
|
package/build/constants.d.ts
CHANGED
|
@@ -295,6 +295,14 @@ export declare const QUESTIONNAIRE: ({
|
|
|
295
295
|
when?: undefined;
|
|
296
296
|
default?: undefined;
|
|
297
297
|
validate?: undefined;
|
|
298
|
+
} | {
|
|
299
|
+
type: string;
|
|
300
|
+
name: string;
|
|
301
|
+
message: string;
|
|
302
|
+
default: boolean;
|
|
303
|
+
when: (answers: Questionnair) => boolean;
|
|
304
|
+
choices?: undefined;
|
|
305
|
+
validate?: undefined;
|
|
298
306
|
} | {
|
|
299
307
|
type: string;
|
|
300
308
|
name: string;
|
|
@@ -377,14 +385,6 @@ export declare const QUESTIONNAIRE: ({
|
|
|
377
385
|
when: (answers: Questionnair) => false | RegExpMatchArray | null;
|
|
378
386
|
choices?: undefined;
|
|
379
387
|
validate?: undefined;
|
|
380
|
-
} | {
|
|
381
|
-
type: string;
|
|
382
|
-
name: string;
|
|
383
|
-
message: string;
|
|
384
|
-
default: boolean;
|
|
385
|
-
when: (answers: Questionnair) => boolean;
|
|
386
|
-
choices?: undefined;
|
|
387
|
-
validate?: undefined;
|
|
388
388
|
} | {
|
|
389
389
|
type: string;
|
|
390
390
|
name: string;
|
package/build/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAG9C,eAAO,MAAM,GAAG,KAA6B,CAAA;AAE7C,eAAO,MAAM,YAAY,QAAqE,CAAA;AAE9F,eAAO,MAAM,kBAAkB;;;;;CAK9B,CAAA;AAED,eAAO,MAAM,mBAAmB,8HAI/B,CAAA;AAED,eAAO,MAAM,6BAA6B,ucAYzC,CAAA;AAED,eAAO,MAAM,iCAAiC,8CAG7C,CAAA;AAED,eAAO,MAAM,WAAW,KAAK,CAAA;AAE7B,eAAO,MAAM,cAAc;;;;CAI1B,CAAA;AAED,eAAO,MAAM,UAAU;;;;CAItB,CAAA;AAED,eAAO,MAAM,uBAAuB,iGAI1B,CAAA;AAEV,eAAO,MAAM,gBAAgB;;;;CAInB,CAAA;AAEV;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmFrB,CAAA;AAEV,eAAO,MAAM,gCAAgC;;;;;;IAQ5C,CAAA;AAED,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAM3D,CAAA;AAED,eAAO,MAAM,eAAe,6OAOlB,CAAA;AAEV,eAAO,MAAM,gBAAg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,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAoBqB,YAAY;;;;;;;uBAWR,YAAY;;;;;;;;;oBAehB,YAAY;;;;;;;oBAQZ,YAAY;;;;;;;;;oBAMZ,YAAY;;;;;;;;;oBAyBZ,YAAY;;;;;;;oBAkDZ,YAAY;;;;;;;uBAuBR,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAcb,YAAY;;;;;;;;;;;;;;;uBAUZ,YAAY;oBAIf,YAAY;;;;;;;uBA6BT,YAAY;oBAKf,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAqBpC,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAWZ,YAAY;wBAUgB,MAAM,EAAE;;IAoCzD,CAAA"}
|
package/build/constants.js
CHANGED
|
@@ -173,9 +173,22 @@ export const REGION_OPTION = [
|
|
|
173
173
|
'eu',
|
|
174
174
|
'apac'
|
|
175
175
|
];
|
|
176
|
+
function isLocalEnvironment(answers) {
|
|
177
|
+
return answers.runner === SUPPORTED_PACKAGES.runner[0].value;
|
|
178
|
+
}
|
|
176
179
|
function isBrowserRunner(answers) {
|
|
177
180
|
return answers.runner === SUPPORTED_PACKAGES.runner[1].value;
|
|
178
181
|
}
|
|
182
|
+
function selectDefaultService(serviceName) {
|
|
183
|
+
return [SUPPORTED_PACKAGES.service.find(
|
|
184
|
+
/* istanbul ignore next */
|
|
185
|
+
({ name }) => name === serviceName)?.value];
|
|
186
|
+
}
|
|
187
|
+
function prioServiceOrderFor(serviceName) {
|
|
188
|
+
const index = SUPPORTED_PACKAGES.service.findIndex(({ name }) => name === serviceName);
|
|
189
|
+
return SUPPORTED_PACKAGES.service.slice(index)
|
|
190
|
+
.concat(SUPPORTED_PACKAGES.service.slice(0, index));
|
|
191
|
+
}
|
|
179
192
|
export const QUESTIONNAIRE = [{
|
|
180
193
|
type: 'list',
|
|
181
194
|
name: 'runner',
|
|
@@ -215,6 +228,13 @@ export const QUESTIONNAIRE = [{
|
|
|
215
228
|
}
|
|
216
229
|
return BACKEND_CHOICES;
|
|
217
230
|
}
|
|
231
|
+
}, {
|
|
232
|
+
type: 'confirm',
|
|
233
|
+
name: 'setupMobileEnvironment',
|
|
234
|
+
message: 'Would you like to setup Appium for mobile testing?',
|
|
235
|
+
default: false,
|
|
236
|
+
when: /* istanbul ignore next */ (answers) => (isLocalEnvironment(answers) &&
|
|
237
|
+
answers.backend === BACKEND_CHOICES[0])
|
|
218
238
|
}, {
|
|
219
239
|
type: 'input',
|
|
220
240
|
name: 'hostname',
|
|
@@ -400,32 +420,28 @@ export const QUESTIONNAIRE = [{
|
|
|
400
420
|
message: 'Do you want to add a service to your test setup?',
|
|
401
421
|
choices: (answers) => {
|
|
402
422
|
if (answers.backend === BACKEND_CHOICES[3]) {
|
|
403
|
-
|
|
404
|
-
return SUPPORTED_PACKAGES.service.slice(index)
|
|
405
|
-
.concat(SUPPORTED_PACKAGES.service.slice(0, index));
|
|
423
|
+
return prioServiceOrderFor('browserstack');
|
|
406
424
|
}
|
|
407
425
|
else if (answers.backend === BACKEND_CHOICES[2]) {
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
426
|
+
return prioServiceOrderFor('sauce');
|
|
427
|
+
}
|
|
428
|
+
else if (answers.setupMobileEnvironment) {
|
|
429
|
+
return prioServiceOrderFor('appium');
|
|
411
430
|
}
|
|
412
431
|
return SUPPORTED_PACKAGES.service;
|
|
413
432
|
},
|
|
414
433
|
// @ts-ignore
|
|
415
434
|
default: (answers) => {
|
|
416
435
|
if (answers.backend === BACKEND_CHOICES[3]) {
|
|
417
|
-
return
|
|
418
|
-
/* istanbul ignore next */
|
|
419
|
-
({ name }) => name === 'browserstack')?.value];
|
|
436
|
+
return selectDefaultService('browserstack');
|
|
420
437
|
}
|
|
421
438
|
else if (answers.backend === BACKEND_CHOICES[2]) {
|
|
422
|
-
return
|
|
423
|
-
|
|
424
|
-
|
|
439
|
+
return selectDefaultService('sauce');
|
|
440
|
+
}
|
|
441
|
+
else if (answers.setupMobileEnvironment) {
|
|
442
|
+
return selectDefaultService('appium');
|
|
425
443
|
}
|
|
426
|
-
return
|
|
427
|
-
/* istanbul ignore next */
|
|
428
|
-
({ name }) => name === 'chromedriver')?.value];
|
|
444
|
+
return selectDefaultService('chromedriver');
|
|
429
445
|
},
|
|
430
446
|
validate: /* istanbul ignore next */ (answers) => validateServiceAnswers(answers)
|
|
431
447
|
}, {
|
|
@@ -451,8 +467,12 @@ export const QUESTIONNAIRE = [{
|
|
|
451
467
|
name: 'baseUrl',
|
|
452
468
|
message: 'What is the base url?',
|
|
453
469
|
default: 'http://localhost',
|
|
454
|
-
// no base url for
|
|
455
|
-
when: /* istanbul ignore next */ (answers) =>
|
|
470
|
+
// no base url for:
|
|
471
|
+
when: /* istanbul ignore next */ (answers) => (
|
|
472
|
+
// unit and component testing in the browser
|
|
473
|
+
!isBrowserRunner(answers) &&
|
|
474
|
+
// mobile testing with Appium
|
|
475
|
+
!answers.setupMobileEnvironment)
|
|
456
476
|
}, {
|
|
457
477
|
type: 'confirm',
|
|
458
478
|
name: 'npmInstall',
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
*/
|
|
8
8
|
if (usePageObjects) { %>
|
|
9
9
|
<%- isUsingTypeScript || esmSupport
|
|
10
|
-
? `import LoginPage from '${relativePath}/login.page${esmSupport
|
|
10
|
+
? `import LoginPage from '${relativePath}/login.page${esmSupport ? '.js' : ''}';`
|
|
11
11
|
: `const LoginPage = require('${relativePath}/login.page');` %>
|
|
12
12
|
<%- isUsingTypeScript || esmSupport
|
|
13
|
-
? `import SecurePage from '${relativePath}/secure.page${esmSupport
|
|
13
|
+
? `import SecurePage from '${relativePath}/secure.page${esmSupport ? '.js' : ''}';`
|
|
14
14
|
: `const SecurePage = require('${relativePath}/secure.page');` %>
|
|
15
15
|
|
|
16
16
|
const pages = {
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
if (usePageObjects) {
|
|
6
6
|
%><%- isUsingTypeScript || esmSupport
|
|
7
|
-
? `import LoginPage from '${relativePath}/login.page${esmSupport
|
|
7
|
+
? `import LoginPage from '${relativePath}/login.page${esmSupport ? '.js' : ''}';`
|
|
8
8
|
: `const LoginPage = require('${relativePath}/login.page');` %>
|
|
9
9
|
<%- isUsingTypeScript || esmSupport
|
|
10
|
-
? `import SecurePage from '${relativePath}/secure.page${esmSupport
|
|
10
|
+
? `import SecurePage from '${relativePath}/secure.page${esmSupport ? '.js' : ''}';`
|
|
11
11
|
: `const SecurePage = require('${relativePath}/secure.page');` %>
|
|
12
12
|
|
|
13
13
|
describe('My Login application', () => {
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
if (usePageObjects) {
|
|
6
6
|
%><%- isUsingTypeScript || esmSupport
|
|
7
|
-
? `import LoginPage from '${relativePath}/login.page${esmSupport
|
|
7
|
+
? `import LoginPage from '${relativePath}/login.page${esmSupport ? '.js' : ''}'`
|
|
8
8
|
: `const LoginPage = require('${relativePath}/login.page')` %>
|
|
9
9
|
<%- isUsingTypeScript || esmSupport
|
|
10
|
-
? `import SecurePage from '${relativePath}/secure.page${esmSupport
|
|
10
|
+
? `import SecurePage from '${relativePath}/secure.page${esmSupport ? '.js' : ''}'`
|
|
11
11
|
: `const SecurePage = require('${relativePath}/secure.page')` %>
|
|
12
12
|
|
|
13
13
|
describe('My Login application', () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<%- isUsingTypeScript ? "import { ChainablePromiseElement } from 'webdriverio';" : "" %>
|
|
2
2
|
|
|
3
3
|
<%- isUsingTypeScript || esmSupport
|
|
4
|
-
? `import Page from './page${esmSupport
|
|
4
|
+
? `import Page from './page${esmSupport ? '.js' : ''}';`
|
|
5
5
|
: "const Page = require('./page');" %>
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<%- isUsingTypeScript ? "import { ChainablePromiseElement } from 'webdriverio';" : "" %>
|
|
2
2
|
|
|
3
3
|
<%- isUsingTypeScript || esmSupport
|
|
4
|
-
? `import Page from './page${esmSupport
|
|
4
|
+
? `import Page from './page${esmSupport ? '.js' : ''}';`
|
|
5
5
|
: "const Page = require('./page');" %>
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// see also: https://webdriver.io/docs/dot-reporter<%
|
|
4
4
|
if (reporters.length) { %>
|
|
5
5
|
reporters: [<%- reporters.map(reporter => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
if (reporter === 'allure') {
|
|
7
|
+
return `['${reporter}', {outputDir: 'allure-results'}]`
|
|
8
|
+
} else {
|
|
9
|
+
return `'${reporter}'`
|
|
10
|
+
}
|
|
11
|
+
}) %>],<% } else { %>
|
|
12
|
+
// reporters: ['dot'],<%
|
|
10
13
|
}
|
|
11
|
-
|
|
12
|
-
<%} else { %>
|
|
13
|
-
// reporters: ['dot'],
|
|
14
|
-
<%}%>
|
|
14
|
+
%>
|
|
@@ -126,19 +126,24 @@ export const config: Options.Testrunner = {<%
|
|
|
126
126
|
// Sauce Labs platform configurator - a great tool to configure your capabilities:
|
|
127
127
|
// https://saucelabs.com/platform/platform-configurator
|
|
128
128
|
//
|
|
129
|
-
capabilities: [{
|
|
130
|
-
|
|
131
|
-
//
|
|
132
|
-
//
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
129
|
+
capabilities: [{<%
|
|
130
|
+
if (answers.expEnvAccessKey) { %>
|
|
131
|
+
// Experitest Access Key
|
|
132
|
+
// get more information at https://docs.experitest.com/display/TE/Obtaining+Access+Key
|
|
133
|
+
'experitest:accessKey': '<%- answers.expEnvAccessKey %>',<%
|
|
134
|
+
}
|
|
135
|
+
if (answers.setupMobileEnvironment) { %>
|
|
136
|
+
// capabilities for local Appium web tests on an Android Emulator
|
|
137
|
+
platformName: 'Android', // or "iOS"
|
|
138
|
+
browserName: 'Chrome', // or "Safari"
|
|
139
|
+
'appium:deviceName': 'Android GoogleAPI Emulator', // or "iPhone Simulator"
|
|
140
|
+
'appium:platformVersion': '12.0', // or "16.2" (for running iOS v16)
|
|
141
|
+
'appium:automationName': 'UiAutomator2' // or "XCUITest"<%
|
|
142
|
+
} else {
|
|
143
|
+
%>
|
|
144
|
+
// capabilities for local browser web tests
|
|
145
|
+
browserName: 'chrome' // or "firefox", "microsoftedge", "safari"<%
|
|
146
|
+
} %>
|
|
142
147
|
}],
|
|
143
148
|
//
|
|
144
149
|
// ===================
|
package/build/types.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export interface Questionnair {
|
|
|
32
32
|
createPackageJSON?: boolean;
|
|
33
33
|
projectRootCorrect?: boolean;
|
|
34
34
|
projectRoot?: string;
|
|
35
|
+
setupMobileEnvironment?: boolean;
|
|
35
36
|
}
|
|
36
37
|
export interface ParsedAnswers extends Omit<Questionnair, 'runner' | 'framework' | 'reporters' | 'services' | 'plugins'> {
|
|
37
38
|
rawAnswers: Questionnair;
|
package/build/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACr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AAM,CAAA;CACf;AAED,MAAM,WAAW,sBAAsB;IACnC,IAAI,EAAE,OAAO,CAAA;IACb,GAAG,EAAE,OAAO,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC7B,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;CACjB;AAED,4CAA4C;AAC5C,MAAM,MAAM,gBAAgB,CAAC,CAAC,IACxB,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,GACpC,iBAAiB,CAAC,CAAC,CAAC,CAAC;AAC3B,KAAK,iBAAiB,CAAC,CAAC,IAClB,YAAY,GACZ,CAAC,YAAY,EAAE,GAAG,CAAC,GACnB,cAAc,CAAC,CAAC,CAAC,CAAC;AACxB,KAAK,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAC7C,KAAK,cAAc,CAAC,CAAC,IAAI;KACpB,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;CACvD,CAAC;AACF,KAAK,OAAO,GAAG,OAAO,CAAC;AAEvB,MAAM,WAAW,YAAY;IACzB,YAAY,EAAE,OAAO,CAAA;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,qBAAqB,CAAA;CACrC"}
|
package/build/utils.d.ts
CHANGED
|
@@ -137,4 +137,5 @@ export declare function setupTypeScript(parsedAnswers: ParsedAnswers): Promise<v
|
|
|
137
137
|
export declare function setupBabel(parsedAnswers: ParsedAnswers): Promise<void>;
|
|
138
138
|
export declare function createWDIOConfig(parsedAnswers: ParsedAnswers): Promise<void>;
|
|
139
139
|
export declare function createWDIOScript(parsedAnswers: ParsedAnswers): Promise<boolean>;
|
|
140
|
+
export declare function runAppiumInstaller(parsedAnswers: ParsedAnswers): Promise<void | import("execa").ExecaReturnValue<string>>;
|
|
140
141
|
//# sourceMappingURL=utils.d.ts.map
|
package/build/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAetD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAGhD,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAMlE,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAQrI,eAAO,MAAM,UAAU,SAAuC,MAAM,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,KAAK,QAAQ,MAAM,CAAC,CAAA;AAEnH,qBAAa,SAAU,SAAQ,kBAAkB;IACtC,MAAM,EAAE,MAAM,CAAA;gBACT,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAI9C;AAED;;GAEG;AACH,wBAAsB,cAAc,CAChC,QAAQ,EAAE,QAAQ,CAAC,eAAe,EAAE,EACpC,QAAQ,EAAE,MAAM,QAAQ,CAAC,aAAa,EACtC,GAAG,IAAI,EAAE,GAAG,EAAE,sBA2BjB;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,QAAQ,GAA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ger';
|
|
13
13
|
import readDir from 'recursive-readdir';
|
|
14
14
|
import yarnInstall from 'yarn-install';
|
|
15
|
+
import { $ } from 'execa';
|
|
15
16
|
import { readPackageUp } from 'read-pkg-up';
|
|
16
17
|
import { resolve } from 'import-meta-resolve';
|
|
17
18
|
import { SevereServiceError } from 'webdriverio';
|
|
@@ -115,9 +116,6 @@ export async function runOnCompleteHook(onCompleteHook, config, capabilities, ex
|
|
|
115
116
|
*/
|
|
116
117
|
export function getRunnerName(caps = {}) {
|
|
117
118
|
let runner = caps.browserName ||
|
|
118
|
-
caps.appPackage ||
|
|
119
|
-
caps.appWaitActivity ||
|
|
120
|
-
caps.app ||
|
|
121
119
|
caps.platformName ||
|
|
122
120
|
caps['appium:platformName'] ||
|
|
123
121
|
caps['appium:appPackage'] ||
|
|
@@ -186,7 +184,7 @@ export function addServiceDeps(names, packages, update = false) {
|
|
|
186
184
|
* was selected for install
|
|
187
185
|
*/
|
|
188
186
|
if (names.some(({ short }) => short === 'appium')) {
|
|
189
|
-
const result = execSync('appium --version || echo APPIUM_MISSING').toString().trim();
|
|
187
|
+
const result = execSync('appium --version || echo APPIUM_MISSING', { stdio: 'pipe' }).toString().trim();
|
|
190
188
|
if (result === 'APPIUM_MISSING') {
|
|
191
189
|
packages.push('appium');
|
|
192
190
|
}
|
|
@@ -387,7 +385,9 @@ async function generateLocalRunnerTestFiles(answers) {
|
|
|
387
385
|
}
|
|
388
386
|
export async function getAnswers(yes) {
|
|
389
387
|
if (yes) {
|
|
390
|
-
const
|
|
388
|
+
const ignoredQuestions = ['setupMobileEnvironment'];
|
|
389
|
+
const filterdQuestionaire = QUESTIONNAIRE.filter((question) => !ignoredQuestions.includes(question.name));
|
|
390
|
+
const answers = filterdQuestionaire.reduce((answers, question) => Object.assign(answers, question.when && !question.when(answers)
|
|
391
391
|
/**
|
|
392
392
|
* set nothing if question doesn't apply
|
|
393
393
|
*/
|
|
@@ -745,3 +745,19 @@ export async function createWDIOScript(parsedAnswers) {
|
|
|
745
745
|
return false;
|
|
746
746
|
}
|
|
747
747
|
}
|
|
748
|
+
export async function runAppiumInstaller(parsedAnswers) {
|
|
749
|
+
if (!parsedAnswers.setupMobileEnvironment) {
|
|
750
|
+
return;
|
|
751
|
+
}
|
|
752
|
+
const answer = await inquirer.prompt({
|
|
753
|
+
name: 'continueWithAppiumSetup',
|
|
754
|
+
message: 'Continue with Appium setup using appium-installer (https://github.com/AppiumTestDistribution/appium-installer)?',
|
|
755
|
+
type: 'confirm',
|
|
756
|
+
default: true
|
|
757
|
+
});
|
|
758
|
+
if (!answer.continueWithAppiumSetup) {
|
|
759
|
+
return console.log('Ok! You can learn more about setting up mobile environments in the ' +
|
|
760
|
+
'Appium docs at https://appium.io/docs/en/2.0/quickstart/');
|
|
761
|
+
}
|
|
762
|
+
return $({ stdio: 'inherit' }) `npx appium-installer`;
|
|
763
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/cli",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.10.0",
|
|
4
4
|
"description": "WebdriverIO testrunner command line interface",
|
|
5
5
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-cli",
|
|
@@ -46,12 +46,12 @@
|
|
|
46
46
|
"typeScriptVersion": "3.8.3",
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@types/node": "^18.0.0",
|
|
49
|
-
"@wdio/config": "8.
|
|
50
|
-
"@wdio/globals": "8.
|
|
49
|
+
"@wdio/config": "8.10.0",
|
|
50
|
+
"@wdio/globals": "8.10.0",
|
|
51
51
|
"@wdio/logger": "8.6.6",
|
|
52
52
|
"@wdio/protocols": "8.8.1",
|
|
53
|
-
"@wdio/types": "8.
|
|
54
|
-
"@wdio/utils": "8.
|
|
53
|
+
"@wdio/types": "8.10.0",
|
|
54
|
+
"@wdio/utils": "8.10.0",
|
|
55
55
|
"async-exit-hook": "^2.0.1",
|
|
56
56
|
"chalk": "^5.0.1",
|
|
57
57
|
"chokidar": "^3.5.3",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"lodash.union": "^4.6.0",
|
|
66
66
|
"read-pkg-up": "9.1.0",
|
|
67
67
|
"recursive-readdir": "^2.2.2",
|
|
68
|
-
"webdriverio": "8.
|
|
68
|
+
"webdriverio": "8.10.0",
|
|
69
69
|
"yargs": "^17.5.1",
|
|
70
70
|
"yarn-install": "^1.0.0"
|
|
71
71
|
},
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"publishConfig": {
|
|
83
83
|
"access": "public"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "f0c607340b4f31a4ae48509115335283f488e38f"
|
|
86
86
|
}
|