diff --git a/src/commands/mobile/api/describe-test-result.ts b/src/commands/mobile/api/describe-test-result.ts index d8d4a5e4..a9433e7c 100644 --- a/src/commands/mobile/api/describe-test-result.ts +++ b/src/commands/mobile/api/describe-test-result.ts @@ -8,11 +8,10 @@ export default class MobileApiDescribeTestResult extends Command { static flags = { "project-id": Flags.string({ - description: - "ID of the project from which the test results will be obtained.", + description: `ID of the project from which the test results will be obtained.`, required: true, }), - id: Flags.string({ description: "Test Result ID.", required: true }), + id: Flags.string({ description: `Test Result ID.`, required: true }), }; public async run(): Promise { diff --git a/src/commands/mobile/api/list-test-results.ts b/src/commands/mobile/api/list-test-results.ts index a14d7f9f..dc8985bc 100644 --- a/src/commands/mobile/api/list-test-results.ts +++ b/src/commands/mobile/api/list-test-results.ts @@ -8,20 +8,19 @@ export default class MobileApiListTestResults extends Command { static flags = { "project-id": Flags.string({ - description: - "ID of the project from which the list of test results will be retrieved.", + description: `ID of the project from which the list of test results will be retrieved.`, required: true, }), page: Flags.integer({ - description: "Page number to be retrieved.", + description: `Page number to be retrieved.`, required: false, }), "per-page": Flags.integer({ - description: "Number of test results per page.", + description: `Number of test results per page.`, required: false, }), "test-plan-id": Flags.string({ - description: "ID of the test plan.", + description: `ID of the test plan.`, required: false, }), }; diff --git a/src/commands/mobile/api/run-test-plan.ts b/src/commands/mobile/api/run-test-plan.ts index 1a15b989..42f3163f 100644 --- a/src/commands/mobile/api/run-test-plan.ts +++ b/src/commands/mobile/api/run-test-plan.ts @@ -8,11 +8,11 @@ export default class MobileApiRunTestPlan extends Command { static flags = { "test-plan-id": Flags.string({ - description: "The ID of the test plan to run.", + description: `The ID of the test plan to run.`, required: true, }), "run-test-plan-request": Flags.string({ - description: "The build_id to execute the test plan.", + description: `The build_id to execute the test plan.`, required: true, }), }; diff --git a/src/commands/mobile/api/upload-build.ts b/src/commands/mobile/api/upload-build.ts index cb95a160..2b925bd6 100644 --- a/src/commands/mobile/api/upload-build.ts +++ b/src/commands/mobile/api/upload-build.ts @@ -8,10 +8,10 @@ export default class MobileApiUploadBuild extends Command { static flags = { "project-id": Flags.string({ - description: "The ID of the project to upload the build file to.", + description: `The ID of the project to upload the build file to.`, required: true, }), - file: Flags.string({ description: "Build file.", required: true }), + file: Flags.string({ description: `Build file.`, required: true }), }; public async run(): Promise { diff --git a/src/commands/web/api/create-access-point.ts b/src/commands/web/api/create-access-point.ts index 64af27b0..362f9e87 100644 --- a/src/commands/web/api/create-access-point.ts +++ b/src/commands/web/api/create-access-point.ts @@ -9,12 +9,11 @@ export default class WebApiCreateAccessPoint extends Command { static flags = { "project-id": Flags.integer({ - description: - "For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios", + description: `For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios`, required: true, }), "create-access-point-request": Flags.string({ - description: "The name of the access point to be created", + description: `The name of the access point to be created`, required: true, }), }; diff --git a/src/commands/web/api/create-test-plan-variable.ts b/src/commands/web/api/create-test-plan-variable.ts index d88d3ab2..a7ff20b7 100644 --- a/src/commands/web/api/create-test-plan-variable.ts +++ b/src/commands/web/api/create-test-plan-variable.ts @@ -8,13 +8,11 @@ export default class WebApiCreateTestPlanVariable extends Command { static flags = { "test-plan-id": Flags.integer({ - description: - "For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15", + description: `For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15`, required: true, }), "create-test-plan-variable-request": Flags.string({ - description: - "The new variable key and default value to use in the test plan", + description: `The new variable key and default value to use in the test plan`, required: true, }), }; diff --git a/src/commands/web/api/create-url-replacement.ts b/src/commands/web/api/create-url-replacement.ts index d1e40769..09e447c7 100644 --- a/src/commands/web/api/create-url-replacement.ts +++ b/src/commands/web/api/create-url-replacement.ts @@ -8,12 +8,11 @@ export default class WebApiCreateUrlReplacement extends Command { static flags = { "test-plan-id": Flags.integer({ - description: - "For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15", + description: `For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15`, required: true, }), "create-url-replacement-request": Flags.string({ - description: "The url to replace", + description: `The url to replace`, required: true, }), }; diff --git a/src/commands/web/api/delete-access-point.ts b/src/commands/web/api/delete-access-point.ts index bb6b195c..bf36f73c 100644 --- a/src/commands/web/api/delete-access-point.ts +++ b/src/commands/web/api/delete-access-point.ts @@ -8,12 +8,11 @@ export default class WebApiDeleteAccessPoint extends Command { static flags = { "project-id": Flags.integer({ - description: - "For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios", + description: `For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios`, required: true, }), "delete-access-point-request": Flags.string({ - description: "The name of the access point to be deleted", + description: `The name of the access point to be deleted`, required: true, }), }; diff --git a/src/commands/web/api/delete-test-plan-variable.ts b/src/commands/web/api/delete-test-plan-variable.ts index 785268ab..ecb349df 100644 --- a/src/commands/web/api/delete-test-plan-variable.ts +++ b/src/commands/web/api/delete-test-plan-variable.ts @@ -9,12 +9,11 @@ export default class WebApiDeleteTestPlanVariable extends Command { static flags = { "test-plan-id": Flags.integer({ - description: - "For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15/", + description: `For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15/`, required: true, }), "test-plan-variable-id": Flags.integer({ - description: "test_plan_variable id", + description: `test_plan_variable id`, required: true, }), }; diff --git a/src/commands/web/api/delete-url-replacement.ts b/src/commands/web/api/delete-url-replacement.ts index 0e99cfa9..cbd39bd0 100644 --- a/src/commands/web/api/delete-url-replacement.ts +++ b/src/commands/web/api/delete-url-replacement.ts @@ -8,12 +8,11 @@ export default class WebApiDeleteUrlReplacement extends Command { static flags = { "test-plan-id": Flags.integer({ - description: - "For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15", + description: `For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15`, required: true, }), "url-replacement-id": Flags.integer({ - description: "url_replacement id", + description: `url_replacement id`, required: true, }), }; diff --git a/src/commands/web/api/describe-result.ts b/src/commands/web/api/describe-result.ts index f4bc0f9d..af9704dc 100644 --- a/src/commands/web/api/describe-result.ts +++ b/src/commands/web/api/describe-result.ts @@ -8,17 +8,15 @@ export default class WebApiDescribeResult extends Command { static flags = { "project-id": Flags.integer({ - description: - "For example, 1 for the following URL: https://app.autify.com/projects/1/results/4", + description: `For example, 1 for the following URL: https://app.autify.com/projects/1/results/4`, required: true, }), "result-id": Flags.integer({ - description: - "For example, 4 for the following URL: https://app.autify.com/projects/1/results/4", + description: `For example, 4 for the following URL: https://app.autify.com/projects/1/results/4`, required: true, }), "get-details": Flags.string({ - description: "The flag to get details of the test case result.", + description: `The flag to get details of the test case result.`, required: false, }), }; diff --git a/src/commands/web/api/describe-scenario.ts b/src/commands/web/api/describe-scenario.ts index 31e57e67..0b98479c 100644 --- a/src/commands/web/api/describe-scenario.ts +++ b/src/commands/web/api/describe-scenario.ts @@ -8,13 +8,11 @@ export default class WebApiDescribeScenario extends Command { static flags = { "project-id": Flags.integer({ - description: - "For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2", + description: `For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2`, required: true, }), "scenario-id": Flags.integer({ - description: - "For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2", + description: `For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2`, required: true, }), }; diff --git a/src/commands/web/api/execute-scenarios.ts b/src/commands/web/api/execute-scenarios.ts index bdafe4ac..3b49a219 100644 --- a/src/commands/web/api/execute-scenarios.ts +++ b/src/commands/web/api/execute-scenarios.ts @@ -9,12 +9,11 @@ export default class WebApiExecuteScenarios extends Command { static flags = { "project-id": Flags.integer({ - description: - "For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios", + description: `For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios`, required: true, }), "execute-scenarios-request": Flags.string({ - description: "The scenarios and settings to execute", + description: `The scenarios and settings to execute`, required: true, }), }; diff --git a/src/commands/web/api/execute-schedule.ts b/src/commands/web/api/execute-schedule.ts index 7fbac1c4..d075178b 100644 --- a/src/commands/web/api/execute-schedule.ts +++ b/src/commands/web/api/execute-schedule.ts @@ -3,18 +3,17 @@ import { getWebClient } from "../../../autify/web/getWebClient"; export default class WebApiExecuteSchedule extends Command { static description = - '"Schedule" is called as "Test Plan" now.\\ If you want to run a test plan, use this endpoint.'; + '"Schedule" is called as "Test Plan" now. If you want to run a test plan, use this endpoint.'; static examples = ["<%= config.bin %> <%= command.id %>"]; static flags = { "schedule-id": Flags.integer({ - description: - "For example, 3 for the following URL: https://app.autify.com/projects/1/test_plans/3", + description: `For example, 3 for the following URL: https://app.autify.com/projects/1/test_plans/3`, required: true, }), "execute-schedule-request": Flags.string({ - description: "The options to execute a test plan.", + description: `The options to execute a test plan.`, required: false, }), }; diff --git a/src/commands/web/api/get-credit-usage.ts b/src/commands/web/api/get-credit-usage.ts index 8b798872..197b4682 100644 --- a/src/commands/web/api/get-credit-usage.ts +++ b/src/commands/web/api/get-credit-usage.ts @@ -3,36 +3,33 @@ import { getWebClient } from "../../../autify/web/getWebClient"; export default class WebApiGetCreditUsage extends Command { static description = - "Get the number of credits used in the project\\ \\ Notes:\\ This endpoint works only for organizations on credit-based plans. It always returns 0 for `credits_consumed` and `credit_consumption_event_count` if your organization is on a run-based plan."; + "Get the number of credits used in the project Notes: This endpoint works only for organizations on credit-based plans. It always returns 0 for `credits_consumed` and `credit_consumption_event_count` if your organization is on a run-based plan."; static examples = ["<%= config.bin %> <%= command.id %>"]; static flags = { "project-id": Flags.integer({ - description: - "For example, 1 for the following URL: https://app.autify.com/projects/1/credits", + description: `For example, 1 for the following URL: https://app.autify.com/projects/1/credits`, required: true, }), "date-from": Flags.string({ - description: - "The date to start counting used credits from.\\ If not specified, the date will be set to 1 week ago.\\ Up to 90 days in advance can be specified. If the specified date is more than 90 days in the past, the date will be set to 90 days ago.\\ Date must follow the format YYYY-MM-DD (example: "2023-09-21").", + description: `The date to start counting used credits from. If not specified, the date will be set to 1 week ago. Up to 90 days in advance can be specified. If the specified date is more than 90 days in the past, the date will be set to 90 days ago. Date must follow the format YYYY-MM-DD (example: "2023-09-21").`, required: false, }), "date-to": Flags.string({ - description: - "The date to end counting used credits from.\\ If not specified, the date will be set to today.\\ Date must follow the format YYYY-MM-DD (example: "2023-09-28").", + description: `The date to end counting used credits from. If not specified, the date will be set to today. Date must follow the format YYYY-MM-DD (example: "2023-09-28").`, required: false, }), "scenario-id": Flags.integer({ - description: "The scenario ID to filter used credits by.", + description: `The scenario ID to filter used credits by.`, required: false, }), "test-plan-id": Flags.integer({ - description: "The test plan ID to filter used credits by.", + description: `The test plan ID to filter used credits by.`, required: false, }), "user-id": Flags.integer({ - description: "The user ID that executed tests to filter used credits by.", + description: `The user ID that executed tests to filter used credits by.`, required: false, }), }; diff --git a/src/commands/web/api/get-project-info.ts b/src/commands/web/api/get-project-info.ts index d06c8921..c503e5db 100644 --- a/src/commands/web/api/get-project-info.ts +++ b/src/commands/web/api/get-project-info.ts @@ -8,8 +8,7 @@ export default class WebApiGetProjectInfo extends Command { static flags = { "project-id": Flags.integer({ - description: - "For example, 1 for the following URL: https://app.autify.com/projects/1/project_info", + description: `For example, 1 for the following URL: https://app.autify.com/projects/1/project_info`, required: true, }), }; diff --git a/src/commands/web/api/list-access-points.ts b/src/commands/web/api/list-access-points.ts index bc911949..9ca9c98b 100644 --- a/src/commands/web/api/list-access-points.ts +++ b/src/commands/web/api/list-access-points.ts @@ -8,12 +8,11 @@ export default class WebApiListAccessPoints extends Command { static flags = { "project-id": Flags.integer({ - description: - "For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios", + description: `For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios`, required: true, }), page: Flags.integer({ - description: "The number of page returns.", + description: `The number of page returns.`, required: false, }), }; diff --git a/src/commands/web/api/list-capabilities.ts b/src/commands/web/api/list-capabilities.ts index 6742425d..3a59fffe 100644 --- a/src/commands/web/api/list-capabilities.ts +++ b/src/commands/web/api/list-capabilities.ts @@ -8,17 +8,27 @@ export default class WebApiListCapabilities extends Command { static flags = { "project-id": Flags.integer({ - description: - "For example, 1 for the following URL: https://app.autify.com/projects/1/capabilities", + description: `For example, 1 for the following URL: https://app.autify.com/projects/1/capabilities`, required: true, }), - os: Flags.string({ description: "os name to filter", required: false }), + os: Flags.string({ + description: `os name to filter (deprecated)`, + required: false, + }), + "os-type": Flags.string({ + description: `Type of the os to filter`, + required: false, + }), browser: Flags.string({ - description: "browser name to filter", + description: `browser name to filter (deprecated)`, + required: false, + }), + "browser-type": Flags.string({ + description: `Type of the browser to filter`, required: false, }), "device-type": Flags.string({ - description: "device_type name to filter", + description: `device_type name to filter (mobile is deprecated)`, required: false, }), }; @@ -30,8 +40,10 @@ export default class WebApiListCapabilities extends Command { const res = await client.listCapabilities( flags["project-id"], flags.os, + flags["os-type"] ? JSON.parse(flags["os-type"]) : undefined, flags.browser, - flags["device-type"] + flags["browser-type"] ? JSON.parse(flags["browser-type"]) : undefined, + flags["device-type"] ? JSON.parse(flags["device-type"]) : undefined ); console.log(JSON.stringify(res.data, null, 2)); } diff --git a/src/commands/web/api/list-results.ts b/src/commands/web/api/list-results.ts index fa1a07eb..6557dc60 100644 --- a/src/commands/web/api/list-results.ts +++ b/src/commands/web/api/list-results.ts @@ -8,21 +8,19 @@ export default class WebApiListResults extends Command { static flags = { "project-id": Flags.integer({ - description: - "For example, 1 for the following URL: https://app.autify.com/projects/1/results", + description: `For example, 1 for the following URL: https://app.autify.com/projects/1/results`, required: true, }), page: Flags.integer({ - description: "The number of page returns.", + description: `The number of page returns.`, required: false, }), "per-page": Flags.integer({ - description: - "The number of items returns. Default number is 30 and up to a maximum of 100", + description: `The number of items returns. Default number is 30 and up to a maximum of 100`, required: false, }), "test-plan-id": Flags.integer({ - description: "Test plan ID used to filter results.", + description: `Test plan ID used to filter results.`, required: false, }), }; diff --git a/src/commands/web/api/list-scenarios.ts b/src/commands/web/api/list-scenarios.ts index 1c66e509..fd8ad95b 100644 --- a/src/commands/web/api/list-scenarios.ts +++ b/src/commands/web/api/list-scenarios.ts @@ -8,12 +8,11 @@ export default class WebApiListScenarios extends Command { static flags = { "project-id": Flags.integer({ - description: - "For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios", + description: `For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios`, required: true, }), page: Flags.integer({ - description: "The number of page returns.", + description: `The number of page returns.`, required: false, }), }; diff --git a/src/commands/web/api/list-test-plan-variable.ts b/src/commands/web/api/list-test-plan-variable.ts index 85968542..e53bf7f5 100644 --- a/src/commands/web/api/list-test-plan-variable.ts +++ b/src/commands/web/api/list-test-plan-variable.ts @@ -8,8 +8,7 @@ export default class WebApiListTestPlanVariable extends Command { static flags = { "test-plan-id": Flags.integer({ - description: - "For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15", + description: `For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15`, required: true, }), }; diff --git a/src/commands/web/api/list-url-replacements.ts b/src/commands/web/api/list-url-replacements.ts index b3bb6e24..e844cd2c 100644 --- a/src/commands/web/api/list-url-replacements.ts +++ b/src/commands/web/api/list-url-replacements.ts @@ -8,8 +8,7 @@ export default class WebApiListUrlReplacements extends Command { static flags = { "test-plan-id": Flags.integer({ - description: - "For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15", + description: `For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15`, required: true, }), }; diff --git a/src/commands/web/api/update-test-plan-variable.ts b/src/commands/web/api/update-test-plan-variable.ts index 42ea3c23..01b2e6b7 100644 --- a/src/commands/web/api/update-test-plan-variable.ts +++ b/src/commands/web/api/update-test-plan-variable.ts @@ -8,17 +8,15 @@ export default class WebApiUpdateTestPlanVariable extends Command { static flags = { "test-plan-id": Flags.integer({ - description: - "For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15", + description: `For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15`, required: true, }), "test-plan-variable-id": Flags.integer({ - description: "test_plan_variable id", + description: `test_plan_variable id`, required: true, }), "update-test-plan-variable-request": Flags.string({ - description: - "The variable's new key and/or default_value's value to register", + description: `The variable's new key and/or default_value's value to register`, required: true, }), }; diff --git a/src/commands/web/api/update-url-replacement.ts b/src/commands/web/api/update-url-replacement.ts index d8331f95..6c8c75a4 100644 --- a/src/commands/web/api/update-url-replacement.ts +++ b/src/commands/web/api/update-url-replacement.ts @@ -8,17 +8,15 @@ export default class WebApiUpdateUrlReplacement extends Command { static flags = { "test-plan-id": Flags.integer({ - description: - "For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15", + description: `For example, 15 for the following URL: https://app.autify.com/projects/1/test_plans/15`, required: true, }), "url-replacement-id": Flags.integer({ - description: "url_replacement id", + description: `url_replacement id`, required: true, }), "update-url-replacement-request": Flags.string({ - description: - "The url to replace. Either pattern_url or replacement_url is required.", + description: `The url to replace. Either pattern_url or replacement_url is required.`, required: true, }), };