make it easier to use the API (#3839)

This commit is contained in:
Peter Hedenskog 2023-05-10 18:42:15 +02:00 committed by GitHub
parent 9fc887c97a
commit b923d4a2b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 7 deletions

View File

@ -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) {

View File

@ -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',