make it easier to use the API (#3839)
This commit is contained in:
parent
9fc887c97a
commit
b923d4a2b4
|
|
@ -30,6 +30,16 @@ async function api(options) {
|
|||
// a forever loop
|
||||
delete apiOptions.api.hostname;
|
||||
|
||||
if (apiOptions.mobile) {
|
||||
apiOptions.api.testType = 'emulatedMobile';
|
||||
} else if (apiOptions.android) {
|
||||
apiOptions.api.testType = 'android';
|
||||
} else if (apiOptions.safari && apiOptions.safari.ios) {
|
||||
apiOptions.api.testType = 'ios';
|
||||
} else {
|
||||
apiOptions.api.testType = 'desktop';
|
||||
}
|
||||
|
||||
/*
|
||||
// Add support for running multi tests
|
||||
if (options.multi) {
|
||||
|
|
|
|||
|
|
@ -1822,13 +1822,6 @@ export async function parseCommandLine() {
|
|||
describe: 'The location of the worker that run the test.',
|
||||
group: 'API'
|
||||
})
|
||||
.option('api.testType', {
|
||||
describe:
|
||||
'The test type you want to run. The location needs tp have the chosen test type.',
|
||||
default: 'desktop',
|
||||
choices: ['desktop', 'emulatedMobile', 'android', 'ios'],
|
||||
group: 'API'
|
||||
})
|
||||
.option('api.silent', {
|
||||
describe:
|
||||
'Set to true if you do not want to log anything from the communication',
|
||||
|
|
|
|||
Loading…
Reference in New Issue