@suitest/translate
Advanced tools
Comparing version 2.0.0-alpha.0 to 2.0.0
export { NOT_STARTED_REASON, PROGRESS_STATUS } from './constants'; | ||
export { translateStartupError } from './startup'; | ||
export { translateNotStartedReason } from './notStartedReason'; | ||
export { translateProgress } from './progress'; |
@@ -6,6 +6,6 @@ "use strict"; | ||
exports.PROGRESS_STATUS = constants_1.PROGRESS_STATUS; | ||
var startup_1 = require("./startup"); | ||
exports.translateStartupError = startup_1.translateStartupError; | ||
var notStartedReason_1 = require("./notStartedReason"); | ||
exports.translateNotStartedReason = notStartedReason_1.translateNotStartedReason; | ||
var progress_1 = require("./progress"); | ||
exports.translateProgress = progress_1.translateProgress; | ||
//# sourceMappingURL=index.js.map |
@@ -5,4 +5,5 @@ import { Translation } from './types'; | ||
* @description Get humanized progress status explanation result | ||
* @throws {Error} Throws an Error if unknown status is provided or code is required and missing | ||
*/ | ||
export declare function translateProgress(message: ProgressMessage): Translation | undefined; | ||
export declare function translateProgress(message: ProgressMessage): Translation; | ||
declare type ProgressMessage = { | ||
@@ -9,0 +10,0 @@ status?: typeof PROGRESS_STATUS.ACTION_FAILED; |
@@ -5,9 +5,10 @@ "use strict"; | ||
var constants_1 = require("./constants"); | ||
var startup_1 = require("./startup"); | ||
var notStartedReason_1 = require("./notStartedReason"); | ||
/** | ||
* @description Get humanized progress status explanation result | ||
* @throws {Error} Throws an Error if unknown status is provided or code is required and missing | ||
*/ | ||
function translateProgress(message) { | ||
if ('code' in message && message.code !== undefined) { | ||
return startup_1.translateStartupError(message.code); | ||
return notStartedReason_1.translateNotStartedReason(message.code); | ||
} | ||
@@ -26,10 +27,10 @@ switch (message.status) { | ||
// actionFailed should come with code, so it will be proceeded by translateStartupError above | ||
case 'actionFailed': break; | ||
case constants_1.PROGRESS_STATUS.ACTION_FAILED: | ||
throw new Error(texts_1.default['progress.status.actionFailedNoCode']()); | ||
default: | ||
var _status = message.status; | ||
console.warn(_status, 'progress status not handled'); | ||
throw new Error(texts_1.default['progress.status.unknownStatusCode'](_status)); | ||
} | ||
return undefined; | ||
} | ||
exports.translateProgress = translateProgress; | ||
//# sourceMappingURL=progress.js.map |
@@ -39,15 +39,18 @@ export declare const texts: Readonly<{ | ||
'startupError.playstationPlatformError': () => "Cannot continue: PlayStation 4 driver has failed"; | ||
'startupError.playstationPlatformError.desc': () => "PlayStation 4 driver has misbehaved. TODO"; | ||
'startupError.playstationPlatformError.desc': () => "PlayStation 4 driver has misbehaved. Please verify that the device is online and it's current IP address is correctly specified in Suitest. If nothing helps try rebooting the device and restarting SuitestDrive. If the local IP of the device changes, make sure to set up a static IP for the device."; | ||
'startupError.planLimitExceeded': () => "Application or user limit has been exceeded"; | ||
'startupError.planLimitExceeded.desc': () => "Looks like you have reached the limit of applications or users, check your [billing section](https://the.suite.st/preferences/billing) to increase your plan. Please contact [sales@suite.st](sales@suite.st) if you require help with your plan."; | ||
'progress.status.openingApp': () => "Trying to open app..."; | ||
'progress.status.closingApp': () => "Trying to close app..."; | ||
'progress.status.bootingDevice': () => "Running the boot sequence defined for the device..."; | ||
'startupError.unknownReason': (reason: string) => string; | ||
'progress.status.openingApp': () => "Trying to open app…"; | ||
'progress.status.closingApp': () => "Trying to close app…"; | ||
'progress.status.bootingDevice': () => "Running the boot sequence defined for the device…"; | ||
'progress.status.needManual': () => "Paused. For this platform, install and open the application manually."; | ||
'progress.status.recoveringID': () => "Trying to recover Suitest device ID..."; | ||
'progress.status.waitingForConnectionFromBootstrap': () => "Waiting for connection from the Suitest app on device..."; | ||
'progress.status.waitingForConnectionFromIL': () => "Waiting for connection from the instrumentation library..."; | ||
'progress.status.unistallingApp': () => "Uninstalling app..."; | ||
'progress.status.uploadingAndInstallingApp': () => "Uploading and installing app..."; | ||
'progress.status.recoveringID': () => "Trying to recover Suitest device ID…"; | ||
'progress.status.waitingForConnectionFromBootstrap': () => "Waiting for connection from the Suitest app on device…"; | ||
'progress.status.waitingForConnectionFromIL': () => "Waiting for connection from the instrumentation library…"; | ||
'progress.status.unistallingApp': () => "Uninstalling app…"; | ||
'progress.status.uploadingAndInstallingApp': () => "Uploading and installing app…"; | ||
'progress.status.unknownStatusCode': (code: string) => string; | ||
'progress.status.actionFailedNoCode': () => "A code is expected when receiving \"actionFailed\" progress status"; | ||
}>; | ||
export default texts; |
@@ -41,16 +41,19 @@ "use strict"; | ||
'startupError.playstationPlatformError': function () { return 'Cannot continue: PlayStation 4 driver has failed'; }, | ||
'startupError.playstationPlatformError.desc': function () { return 'PlayStation 4 driver has misbehaved. TODO'; }, | ||
'startupError.playstationPlatformError.desc': function () { return 'PlayStation 4 driver has misbehaved. Please verify that the device is online and it\'s current IP address is correctly specified in Suitest. If nothing helps try rebooting the device and restarting SuitestDrive. If the local IP of the device changes, make sure to set up a static IP for the device.'; }, | ||
'startupError.planLimitExceeded': function () { return 'Application or user limit has been exceeded'; }, | ||
'startupError.planLimitExceeded.desc': function () { return 'Looks like you have reached the limit of applications or users, check your [billing section](https://the.suite.st/preferences/billing) to increase your plan. Please contact [sales@suite.st](sales@suite.st) if you require help with your plan.'; }, | ||
'progress.status.openingApp': function () { return 'Trying to open app...'; }, | ||
'progress.status.closingApp': function () { return 'Trying to close app...'; }, | ||
'progress.status.bootingDevice': function () { return 'Running the boot sequence defined for the device...'; }, | ||
'startupError.unknownReason': function (reason) { return "Unknown not started reason received: " + reason; }, | ||
'progress.status.openingApp': function () { return 'Trying to open app…'; }, | ||
'progress.status.closingApp': function () { return 'Trying to close app…'; }, | ||
'progress.status.bootingDevice': function () { return 'Running the boot sequence defined for the device…'; }, | ||
'progress.status.needManual': function () { return 'Paused. For this platform, install and open the application manually.'; }, | ||
'progress.status.recoveringID': function () { return 'Trying to recover Suitest device ID...'; }, | ||
'progress.status.waitingForConnectionFromBootstrap': function () { return 'Waiting for connection from the Suitest app on device...'; }, | ||
'progress.status.waitingForConnectionFromIL': function () { return 'Waiting for connection from the instrumentation library...'; }, | ||
'progress.status.unistallingApp': function () { return 'Uninstalling app...'; }, | ||
'progress.status.uploadingAndInstallingApp': function () { return 'Uploading and installing app...'; }, | ||
'progress.status.recoveringID': function () { return 'Trying to recover Suitest device ID…'; }, | ||
'progress.status.waitingForConnectionFromBootstrap': function () { return 'Waiting for connection from the Suitest app on device…'; }, | ||
'progress.status.waitingForConnectionFromIL': function () { return 'Waiting for connection from the instrumentation library…'; }, | ||
'progress.status.unistallingApp': function () { return 'Uninstalling app…'; }, | ||
'progress.status.uploadingAndInstallingApp': function () { return 'Uploading and installing app…'; }, | ||
'progress.status.unknownStatusCode': function (code) { return "Unknown status code received: " + code; }, | ||
'progress.status.actionFailedNoCode': function () { return 'A code is expected when receiving "actionFailed" progress status'; }, | ||
}); | ||
exports.default = exports.texts; | ||
//# sourceMappingURL=texts.js.map |
@@ -8,6 +8,6 @@ # Test bootstrap | ||
This statuses are received as part of the test result in case it was not possible to start the test execution by the time status is requested. | ||
Reason is defined by `reason` field of `notStartedReason` message: | ||
Reason is defined by `reason` field of `notRunningReason` message: | ||
```typescript | ||
type NotRunningMessage = { | ||
type NotStartedReason = { | ||
type: 'notRunningReason', | ||
@@ -20,2 +20,10 @@ reason: NotRunningReason, | ||
Example: | ||
```typescript | ||
import {translateNotStartedReason} from '@suitest/translate'; | ||
const {title, description} = translateNotStartedReason('blasterError'); | ||
``` | ||
### androidPlatformError | ||
@@ -105,2 +113,8 @@ | ||
### playstationPlatformError | ||
Title: `Cannot continue: PlayStation 4 driver has failed` | ||
Description: `PlayStation 4 driver has misbehaved. Please verify that the device is online and it's current IP address is correctly specified in Suitest. If nothing helps try rebooting the device and restarting SuitestDrive. If the local IP of the device changes, make sure to set up a static IP for the device.` | ||
### rokuPlatformError | ||
@@ -144,4 +158,4 @@ | ||
type: 'progress', | ||
code: NotRunningReason, | ||
status: ProgressMessageStatus, | ||
code: NotStartedReason, | ||
status: ProgressStatus, | ||
} | ||
@@ -155,2 +169,10 @@ ``` | ||
Example: | ||
```typescript | ||
import {translateProgress} from '@suitest/translate'; | ||
const {title, description} = translateProgress({status: 'openingApp', code: 'blasterError'}); | ||
``` | ||
### openingApp | ||
@@ -157,0 +179,0 @@ |
{ | ||
"name": "@suitest/translate", | ||
"version": "2.0.0-alpha.0", | ||
"version": "2.0.0", | ||
"description": "A module that translate Suitest server messages to human readable strings", | ||
@@ -5,0 +5,0 @@ "repository": { |
# Suitest test execution results translation | ||
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/SuitestAutomation/suitest/blob/master/LICENSE) | ||
[![npm version](https://img.shields.io/npm/v/suitest-js-api.svg?style=flat)](https://www.npmjs.com/package/@suitest/translate) | ||
[![CircleCI](https://circleci.com/gh/SuitestAutomation/suitest.svg?style=shield)](https://circleci.com/gh/SuitestAutomation/suitest) | ||
This package contains all results that Suitest may return for the test execution and translations for those errors. | ||
@@ -4,0 +8,0 @@ |
export { NOT_STARTED_REASON, PROGRESS_STATUS } from './constants'; | ||
export { translateStartupError } from './startup'; | ||
export { translateNotStartedReason } from './notStartedReason'; | ||
export { translateProgress } from './progress'; |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).translate={})}(this,function(t){"use strict";var r=Object.freeze({BLASTER_ERROR:"blasterError",BOOTING:"runningBootSequence",CANDYBOX_OFFLINE:"candyBoxOffline",DEVICE_DELETED:"deviceDeleted",DEVICE_DISABLED:"deviceDisabled",DEVICE_IN_USE:"deviceInUse",EXCEEDED_PLAN_LIMITS:"planLimitExceeded",INTERNAL_ERROR:"internalError",NO_ACTIVE_PLAN:"noActivePlan",NO_AUTOMATED_MINUTES:"noAvailableAutomatedMinutes",PLATFORM_ERROR_ANDROID:"androidPlatformError",PLATFORM_ERROR_BOOTSTRAP:"bootstrappedPlatformError",PLATFORM_ERROR_LG_WEBOS:"lgWebosPlatformError",PLATFORM_ERROR_UNDEFINED:"notDefinedPlatform",PLATFORM_ERROR_PLAYSTATION:"playstationPlatformError",PLATFORM_ERROR_ROKU:"rokuPlatformError",PLATFORM_ERROR_XBOX:"xboxPlatformError",PLATFORM_ERROR_APPLE_TV:"applePlatformError",SUITEST_DRIVE_OFFLINE:"suitestDriveOffline",TEST_QUEUED:"testQueued"}),n=Object.freeze({ACTION_FAILED:"actionFailed",APP_UNINSTALL:"unistallingApp",APP_UPLOAD_INSTALL:"uploadingAndInstallingApp",BOOTING_DEVICE:"bootingDevice",CLOSING_APP:"closingApp",DEVICE_IDENTIFICATION:"recoveringID",NOTHING:"nothing",OPENING_APP:"openingApp",WAITING_FOR_BOOTSTRAP:"waitingForConnectionFromBootstrap",WAITING_FOR_IL:"waitingForConnectionFromIL",WAIT_FOR_MANUAL_ACTION:"needManual"}),o=Object.freeze({"startupError.blasterError":function(){return"Cannot continue: IR blaster missing or incorrectly attached"},"startupError.blasterError.desc":function(){return"Infrared blaster assigned to the device is missing or malfunctioning. Check the wiring, replace the blaster or assign another working CandyBox port to this device"},"startupError.bootstrappedPlatformError":function(){return"Cannot continue: Suitest bootstrap app is not running"},"startupError.bootstrappedPlatformError.desc":function(){return"Suitest tried to start the bootstrap application on this device but failed several times and will try no more. Please connect to the device and start the bootstrap app manually, then disconnect and the scheduled test will continue. If you have configured the Suitest channel, tune the TV to this channel and verify that Suitest badge is displayed on TV in the top right corner. If you have not configured the Suitest channel, please contact support"},"startupError.testQueued":function(){return"Test is added to queue"},"startupError.testQueued.desc":function(){return"Execution will start as soon as other tests queued on this device will finish execution"},"startupError.noAvailableAutomatedMinutes":function(){return"Cannot continue: you've used up all of your testing minutes"},"startupError.noAvailableAutomatedMinutes.desc":function(){return"You testing a lot! How about [getting a bigger subscription](https://the.suite.st/preferences/billing)? Or, if you would like to purchase more testing minutes for the current billing cycle, please contact [sales@suite.st](mailto:sales@suite.st). Your testing minutes will renew"},"startupError.noActivePlan":function(){return"Cannot continue: Your subscription has expired"},"startupError.noActivePlan.desc":function(){return"Your subscription has expired, to continue using Suitest please [renew your subscription](https://the.suite.st/preferences/billing)"},"startupError.candyBoxOffline":function(){return"Cannot continue: CandyBox controlling this device is offline"},"startupError.candyBoxOffline.desc":function(){return"Check that the cable plugged into the CandyBox delivers Internet connection or reboot the CandyBox and allow about 5 minutes for it to initialize"},"startupError.suitestDriveOffline":function(){return"Cannot continue: SuitestDrive controlling this device is offline"},"startupError.suitestDriveOffline.desc":function(){return"SuitestDrive controlling this device is not currently running or is offline. Please verify that the host computer has Internet connection and that SuitestDrive is running"},"startupError.runningBootSequence":function(){return"Trying to open Suitest bootstrap application"},"startupError.runningBootSequence.desc":function(){return"Test will start after the Suitest bootstrap application will open. Suitest will attempt to open the app in a number of ways. After each attempt it will wait for 60 seconds for the app to respond. If it will not, Suitest will try the next available method. Current methods are: 1) Sending EXIT key to the device, 2) Executing user defined boot sequence, 3) turning the TV on and off 4) Turning the TV on again. If starting the test takes a long time, you should configure a better boot sequence"},"startupError.deviceInUse":function(){return"A user is currently connected to this device"},"startupError.deviceInUse.desc":function(){return"Execution will continue after the user disconnects"},"startupError.deviceDisabled":function(){return"This device is disabled"},"startupError.deviceDisabled.desc":function(){return"For the execution to continue please enable the device"},"startupError.deviceDeleted":function(){return"Cannot continue: Device is deleted"},"startupError.deviceDeleted.desc":function(){return"The device on which the execution was scheduled has been deleted. Please cancel the test and schedule it on another available device"},"startupError.internalError":function(){return"Cannot continue: Internal error occurred"},"startupError.internalError.desc":function(){return"We are very sorry, but some fishy error occurred when Suitest was trying to execute your test. Our developers have been notified and are already working hard to resolve the problem"},"startupError.notDefinedPlatform":function(){return"Cannot continue: Device does not support this platform"},"startupError.notDefinedPlatform.desc":function(){return"You have scheduled the test execution with a configuration that depends on a platform, which this device does not currently support. You should either configure the platform on the device or cancel the test run"},"startupError.lgWebosPlatformError":function(){return"Cannot continue: LG WebOS driver has failed"},"startupError.lgWebosPlatformError.desc":function(){return"LG WebOS driver has misbehaved. Please verify that the device is online and it's current IP address is correctly specified in Suitest. Then double check if the Development mode is enabled on the device. If nothing helps try rebooting the device and/or the CandyBox"},"startupError.xboxPlatformError":function(){return"Cannot continue: Xbox driver has failed"},"startupError.xboxPlatformError.desc":function(){return"Xbox driver has misbehaved. Please verify that the device is online and it's current IP address and developer credentials are correctly specified in Suitest. If nothing helps try rebooting the device and restarting SuitestDrive"},"startupError.androidPlatformError":function(){return"Cannot continue: Android driver has failed"},"startupError.androidPlatformError.desc":function(){return"Android driver has misbehaved. Please verify that the device is online and it's current IP address is correctly specified in Suitest. If nothing helps try rebooting the device and restarting SuitestDrive"},"startupError.applePlatformError":function(){return"Cannot continue: Apple TV driver has failed"},"startupError.applePlatformError.desc":function(){return"Apple driver has misbehaved. Please verify that the device is paired with Mac that is running SuitestDrive. Make sure that application build is installable on that device. If nothing helps try rebooting the device and restarting SuitestDrive"},"startupError.rokuPlatformError":function(){return"Cannot continue: Roku driver has failed"},"startupError.rokuPlatformError.desc":function(){return"Roku driver has misbehaved. Please verify that the device is online and it's current IP address and developer credentials are correctly specified in Suitest. Then double check if the Development mode is enabled on the device and your channel/application is valid. If the local IP of the device changes, make sure to set up a static IP for the device"},"startupError.playstationPlatformError":function(){return"Cannot continue: PlayStation 4 driver has failed"},"startupError.playstationPlatformError.desc":function(){return"PlayStation 4 driver has misbehaved. TODO"},"startupError.planLimitExceeded":function(){return"Application or user limit has been exceeded"},"startupError.planLimitExceeded.desc":function(){return"Looks like you have reached the limit of applications or users, check your [billing section](https://the.suite.st/preferences/billing) to increase your plan. Please contact [sales@suite.st](sales@suite.st) if you require help with your plan."},"progress.status.openingApp":function(){return"Trying to open app..."},"progress.status.closingApp":function(){return"Trying to close app..."},"progress.status.bootingDevice":function(){return"Running the boot sequence defined for the device..."},"progress.status.needManual":function(){return"Paused. For this platform, install and open the application manually."},"progress.status.recoveringID":function(){return"Trying to recover Suitest device ID..."},"progress.status.waitingForConnectionFromBootstrap":function(){return"Waiting for connection from the Suitest app on device..."},"progress.status.waitingForConnectionFromIL":function(){return"Waiting for connection from the instrumentation library..."},"progress.status.unistallingApp":function(){return"Uninstalling app..."},"progress.status.uploadingAndInstallingApp":function(){return"Uploading and installing app..."}});function i(t){switch(t){case r.BLASTER_ERROR:return{title:o["startupError.blasterError"](),description:o["startupError.blasterError.desc"]()};case r.PLATFORM_ERROR_BOOTSTRAP:return{title:o["startupError.bootstrappedPlatformError"](),description:o["startupError.bootstrappedPlatformError.desc"]()};case r.TEST_QUEUED:return{title:o["startupError.testQueued"](),description:o["startupError.testQueued.desc"]()};case r.NO_AUTOMATED_MINUTES:return{title:o["startupError.noAvailableAutomatedMinutes"](),description:o["startupError.noAvailableAutomatedMinutes.desc"]()};case r.NO_ACTIVE_PLAN:return{title:o["startupError.noActivePlan"](),description:o["startupError.noActivePlan.desc"]()};case r.CANDYBOX_OFFLINE:return{title:o["startupError.candyBoxOffline"](),description:o["startupError.candyBoxOffline.desc"]()};case r.SUITEST_DRIVE_OFFLINE:return{title:o["startupError.suitestDriveOffline"](),description:o["startupError.suitestDriveOffline.desc"]()};case r.BOOTING:return{title:o["startupError.runningBootSequence"](),description:o["startupError.runningBootSequence.desc"]()};case r.DEVICE_IN_USE:return{title:o["startupError.deviceInUse"](),description:o["startupError.deviceInUse.desc"]()};case r.DEVICE_DISABLED:return{title:o["startupError.deviceDisabled"](),description:o["startupError.deviceDisabled.desc"]()};case r.DEVICE_DELETED:return{title:o["startupError.deviceDeleted"](),description:o["startupError.deviceDeleted.desc"]()};case r.INTERNAL_ERROR:return{title:o["startupError.internalError"](),description:o["startupError.internalError.desc"]()};case r.PLATFORM_ERROR_UNDEFINED:return{title:o["startupError.notDefinedPlatform"](),description:o["startupError.notDefinedPlatform.desc"]()};case r.PLATFORM_ERROR_LG_WEBOS:return{title:o["startupError.lgWebosPlatformError"](),description:o["startupError.lgWebosPlatformError.desc"]()};case r.PLATFORM_ERROR_XBOX:return{title:o["startupError.xboxPlatformError"](),description:o["startupError.xboxPlatformError.desc"]()};case r.PLATFORM_ERROR_ANDROID:return{title:o["startupError.androidPlatformError"](),description:o["startupError.androidPlatformError.desc"]()};case r.PLATFORM_ERROR_APPLE_TV:return{title:o["startupError.applePlatformError"](),description:o["startupError.applePlatformError.desc"]()};case r.PLATFORM_ERROR_ROKU:return{title:o["startupError.rokuPlatformError"](),description:o["startupError.rokuPlatformError.desc"]()};case r.EXCEEDED_PLAN_LIMITS:return{title:o["startupError.planLimitExceeded"](),description:o["startupError.planLimitExceeded.desc"]()};case r.PLATFORM_ERROR_PLAYSTATION:return{title:o["startupError.playstationPlatformError"](),description:o["startupError.playstationPlatformError.desc"]()};default:var e=t;console.warn(e,"startup error code does not exist")}}t.NOT_STARTED_REASON=r,t.PROGRESS_STATUS=n,t.translateProgress=function(t){if("code"in t&&void 0!==t.code)return i(t.code);switch(t.status){case n.OPENING_APP:return{title:o["progress.status.openingApp"]()};case n.CLOSING_APP:return{title:o["progress.status.closingApp"]()};case n.BOOTING_DEVICE:return{title:o["progress.status.bootingDevice"]()};case n.WAIT_FOR_MANUAL_ACTION:return{title:o["progress.status.needManual"]()};case n.DEVICE_IDENTIFICATION:return{title:o["progress.status.recoveringID"]()};case n.WAITING_FOR_BOOTSTRAP:return{title:o["progress.status.waitingForConnectionFromBootstrap"]()};case n.WAITING_FOR_IL:return{title:o["progress.status.waitingForConnectionFromIL"]()};case n.APP_UNINSTALL:return{title:o["progress.status.unistallingApp"]()};case n.APP_UPLOAD_INSTALL:return{title:o["progress.status.uploadingAndInstallingApp"]()};case n.NOTHING:return{title:""};case"actionFailed":break;default:var e=t.status;console.warn(e,"progress status not handled")}},t.translateStartupError=i,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).translate={})}(this,function(e){"use strict";var r=Object.freeze({BLASTER_ERROR:"blasterError",BOOTING:"runningBootSequence",CANDYBOX_OFFLINE:"candyBoxOffline",DEVICE_DELETED:"deviceDeleted",DEVICE_DISABLED:"deviceDisabled",DEVICE_IN_USE:"deviceInUse",EXCEEDED_PLAN_LIMITS:"planLimitExceeded",INTERNAL_ERROR:"internalError",NO_ACTIVE_PLAN:"noActivePlan",NO_AUTOMATED_MINUTES:"noAvailableAutomatedMinutes",PLATFORM_ERROR_ANDROID:"androidPlatformError",PLATFORM_ERROR_BOOTSTRAP:"bootstrappedPlatformError",PLATFORM_ERROR_LG_WEBOS:"lgWebosPlatformError",PLATFORM_ERROR_UNDEFINED:"notDefinedPlatform",PLATFORM_ERROR_PLAYSTATION:"playstationPlatformError",PLATFORM_ERROR_ROKU:"rokuPlatformError",PLATFORM_ERROR_XBOX:"xboxPlatformError",PLATFORM_ERROR_APPLE_TV:"applePlatformError",SUITEST_DRIVE_OFFLINE:"suitestDriveOffline",TEST_QUEUED:"testQueued"}),n=Object.freeze({ACTION_FAILED:"actionFailed",APP_UNINSTALL:"unistallingApp",APP_UPLOAD_INSTALL:"uploadingAndInstallingApp",BOOTING_DEVICE:"bootingDevice",CLOSING_APP:"closingApp",DEVICE_IDENTIFICATION:"recoveringID",NOTHING:"nothing",OPENING_APP:"openingApp",WAITING_FOR_BOOTSTRAP:"waitingForConnectionFromBootstrap",WAITING_FOR_IL:"waitingForConnectionFromIL",WAIT_FOR_MANUAL_ACTION:"needManual"}),o=Object.freeze({"startupError.blasterError":function(){return"Cannot continue: IR blaster missing or incorrectly attached"},"startupError.blasterError.desc":function(){return"Infrared blaster assigned to the device is missing or malfunctioning. Check the wiring, replace the blaster or assign another working CandyBox port to this device"},"startupError.bootstrappedPlatformError":function(){return"Cannot continue: Suitest bootstrap app is not running"},"startupError.bootstrappedPlatformError.desc":function(){return"Suitest tried to start the bootstrap application on this device but failed several times and will try no more. Please connect to the device and start the bootstrap app manually, then disconnect and the scheduled test will continue. If you have configured the Suitest channel, tune the TV to this channel and verify that Suitest badge is displayed on TV in the top right corner. If you have not configured the Suitest channel, please contact support"},"startupError.testQueued":function(){return"Test is added to queue"},"startupError.testQueued.desc":function(){return"Execution will start as soon as other tests queued on this device will finish execution"},"startupError.noAvailableAutomatedMinutes":function(){return"Cannot continue: you've used up all of your testing minutes"},"startupError.noAvailableAutomatedMinutes.desc":function(){return"You testing a lot! How about [getting a bigger subscription](https://the.suite.st/preferences/billing)? Or, if you would like to purchase more testing minutes for the current billing cycle, please contact [sales@suite.st](mailto:sales@suite.st). Your testing minutes will renew"},"startupError.noActivePlan":function(){return"Cannot continue: Your subscription has expired"},"startupError.noActivePlan.desc":function(){return"Your subscription has expired, to continue using Suitest please [renew your subscription](https://the.suite.st/preferences/billing)"},"startupError.candyBoxOffline":function(){return"Cannot continue: CandyBox controlling this device is offline"},"startupError.candyBoxOffline.desc":function(){return"Check that the cable plugged into the CandyBox delivers Internet connection or reboot the CandyBox and allow about 5 minutes for it to initialize"},"startupError.suitestDriveOffline":function(){return"Cannot continue: SuitestDrive controlling this device is offline"},"startupError.suitestDriveOffline.desc":function(){return"SuitestDrive controlling this device is not currently running or is offline. Please verify that the host computer has Internet connection and that SuitestDrive is running"},"startupError.runningBootSequence":function(){return"Trying to open Suitest bootstrap application"},"startupError.runningBootSequence.desc":function(){return"Test will start after the Suitest bootstrap application will open. Suitest will attempt to open the app in a number of ways. After each attempt it will wait for 60 seconds for the app to respond. If it will not, Suitest will try the next available method. Current methods are: 1) Sending EXIT key to the device, 2) Executing user defined boot sequence, 3) turning the TV on and off 4) Turning the TV on again. If starting the test takes a long time, you should configure a better boot sequence"},"startupError.deviceInUse":function(){return"A user is currently connected to this device"},"startupError.deviceInUse.desc":function(){return"Execution will continue after the user disconnects"},"startupError.deviceDisabled":function(){return"This device is disabled"},"startupError.deviceDisabled.desc":function(){return"For the execution to continue please enable the device"},"startupError.deviceDeleted":function(){return"Cannot continue: Device is deleted"},"startupError.deviceDeleted.desc":function(){return"The device on which the execution was scheduled has been deleted. Please cancel the test and schedule it on another available device"},"startupError.internalError":function(){return"Cannot continue: Internal error occurred"},"startupError.internalError.desc":function(){return"We are very sorry, but some fishy error occurred when Suitest was trying to execute your test. Our developers have been notified and are already working hard to resolve the problem"},"startupError.notDefinedPlatform":function(){return"Cannot continue: Device does not support this platform"},"startupError.notDefinedPlatform.desc":function(){return"You have scheduled the test execution with a configuration that depends on a platform, which this device does not currently support. You should either configure the platform on the device or cancel the test run"},"startupError.lgWebosPlatformError":function(){return"Cannot continue: LG WebOS driver has failed"},"startupError.lgWebosPlatformError.desc":function(){return"LG WebOS driver has misbehaved. Please verify that the device is online and it's current IP address is correctly specified in Suitest. Then double check if the Development mode is enabled on the device. If nothing helps try rebooting the device and/or the CandyBox"},"startupError.xboxPlatformError":function(){return"Cannot continue: Xbox driver has failed"},"startupError.xboxPlatformError.desc":function(){return"Xbox driver has misbehaved. Please verify that the device is online and it's current IP address and developer credentials are correctly specified in Suitest. If nothing helps try rebooting the device and restarting SuitestDrive"},"startupError.androidPlatformError":function(){return"Cannot continue: Android driver has failed"},"startupError.androidPlatformError.desc":function(){return"Android driver has misbehaved. Please verify that the device is online and it's current IP address is correctly specified in Suitest. If nothing helps try rebooting the device and restarting SuitestDrive"},"startupError.applePlatformError":function(){return"Cannot continue: Apple TV driver has failed"},"startupError.applePlatformError.desc":function(){return"Apple driver has misbehaved. Please verify that the device is paired with Mac that is running SuitestDrive. Make sure that application build is installable on that device. If nothing helps try rebooting the device and restarting SuitestDrive"},"startupError.rokuPlatformError":function(){return"Cannot continue: Roku driver has failed"},"startupError.rokuPlatformError.desc":function(){return"Roku driver has misbehaved. Please verify that the device is online and it's current IP address and developer credentials are correctly specified in Suitest. Then double check if the Development mode is enabled on the device and your channel/application is valid. If the local IP of the device changes, make sure to set up a static IP for the device"},"startupError.playstationPlatformError":function(){return"Cannot continue: PlayStation 4 driver has failed"},"startupError.playstationPlatformError.desc":function(){return"PlayStation 4 driver has misbehaved. Please verify that the device is online and it's current IP address is correctly specified in Suitest. If nothing helps try rebooting the device and restarting SuitestDrive. If the local IP of the device changes, make sure to set up a static IP for the device."},"startupError.planLimitExceeded":function(){return"Application or user limit has been exceeded"},"startupError.planLimitExceeded.desc":function(){return"Looks like you have reached the limit of applications or users, check your [billing section](https://the.suite.st/preferences/billing) to increase your plan. Please contact [sales@suite.st](sales@suite.st) if you require help with your plan."},"startupError.unknownReason":function(e){return"Unknown not started reason received: "+e},"progress.status.openingApp":function(){return"Trying to open app…"},"progress.status.closingApp":function(){return"Trying to close app…"},"progress.status.bootingDevice":function(){return"Running the boot sequence defined for the device…"},"progress.status.needManual":function(){return"Paused. For this platform, install and open the application manually."},"progress.status.recoveringID":function(){return"Trying to recover Suitest device ID…"},"progress.status.waitingForConnectionFromBootstrap":function(){return"Waiting for connection from the Suitest app on device…"},"progress.status.waitingForConnectionFromIL":function(){return"Waiting for connection from the instrumentation library…"},"progress.status.unistallingApp":function(){return"Uninstalling app…"},"progress.status.uploadingAndInstallingApp":function(){return"Uploading and installing app…"},"progress.status.unknownStatusCode":function(e){return"Unknown status code received: "+e},"progress.status.actionFailedNoCode":function(){return'A code is expected when receiving "actionFailed" progress status'}});function i(e){switch(e){case r.BLASTER_ERROR:return{title:o["startupError.blasterError"](),description:o["startupError.blasterError.desc"]()};case r.PLATFORM_ERROR_BOOTSTRAP:return{title:o["startupError.bootstrappedPlatformError"](),description:o["startupError.bootstrappedPlatformError.desc"]()};case r.TEST_QUEUED:return{title:o["startupError.testQueued"](),description:o["startupError.testQueued.desc"]()};case r.NO_AUTOMATED_MINUTES:return{title:o["startupError.noAvailableAutomatedMinutes"](),description:o["startupError.noAvailableAutomatedMinutes.desc"]()};case r.NO_ACTIVE_PLAN:return{title:o["startupError.noActivePlan"](),description:o["startupError.noActivePlan.desc"]()};case r.CANDYBOX_OFFLINE:return{title:o["startupError.candyBoxOffline"](),description:o["startupError.candyBoxOffline.desc"]()};case r.SUITEST_DRIVE_OFFLINE:return{title:o["startupError.suitestDriveOffline"](),description:o["startupError.suitestDriveOffline.desc"]()};case r.BOOTING:return{title:o["startupError.runningBootSequence"](),description:o["startupError.runningBootSequence.desc"]()};case r.DEVICE_IN_USE:return{title:o["startupError.deviceInUse"](),description:o["startupError.deviceInUse.desc"]()};case r.DEVICE_DISABLED:return{title:o["startupError.deviceDisabled"](),description:o["startupError.deviceDisabled.desc"]()};case r.DEVICE_DELETED:return{title:o["startupError.deviceDeleted"](),description:o["startupError.deviceDeleted.desc"]()};case r.INTERNAL_ERROR:return{title:o["startupError.internalError"](),description:o["startupError.internalError.desc"]()};case r.PLATFORM_ERROR_UNDEFINED:return{title:o["startupError.notDefinedPlatform"](),description:o["startupError.notDefinedPlatform.desc"]()};case r.PLATFORM_ERROR_LG_WEBOS:return{title:o["startupError.lgWebosPlatformError"](),description:o["startupError.lgWebosPlatformError.desc"]()};case r.PLATFORM_ERROR_XBOX:return{title:o["startupError.xboxPlatformError"](),description:o["startupError.xboxPlatformError.desc"]()};case r.PLATFORM_ERROR_ANDROID:return{title:o["startupError.androidPlatformError"](),description:o["startupError.androidPlatformError.desc"]()};case r.PLATFORM_ERROR_APPLE_TV:return{title:o["startupError.applePlatformError"](),description:o["startupError.applePlatformError.desc"]()};case r.PLATFORM_ERROR_ROKU:return{title:o["startupError.rokuPlatformError"](),description:o["startupError.rokuPlatformError.desc"]()};case r.EXCEEDED_PLAN_LIMITS:return{title:o["startupError.planLimitExceeded"](),description:o["startupError.planLimitExceeded.desc"]()};case r.PLATFORM_ERROR_PLAYSTATION:return{title:o["startupError.playstationPlatformError"](),description:o["startupError.playstationPlatformError.desc"]()};default:var t=e;throw new Error(o["startupError.unknownReason"](t))}}e.NOT_STARTED_REASON=r,e.PROGRESS_STATUS=n,e.translateNotStartedReason=i,e.translateProgress=function(e){if("code"in e&&void 0!==e.code)return i(e.code);switch(e.status){case n.OPENING_APP:return{title:o["progress.status.openingApp"]()};case n.CLOSING_APP:return{title:o["progress.status.closingApp"]()};case n.BOOTING_DEVICE:return{title:o["progress.status.bootingDevice"]()};case n.WAIT_FOR_MANUAL_ACTION:return{title:o["progress.status.needManual"]()};case n.DEVICE_IDENTIFICATION:return{title:o["progress.status.recoveringID"]()};case n.WAITING_FOR_BOOTSTRAP:return{title:o["progress.status.waitingForConnectionFromBootstrap"]()};case n.WAITING_FOR_IL:return{title:o["progress.status.waitingForConnectionFromIL"]()};case n.APP_UNINSTALL:return{title:o["progress.status.unistallingApp"]()};case n.APP_UPLOAD_INSTALL:return{title:o["progress.status.uploadingAndInstallingApp"]()};case n.NOTHING:return{title:""};case n.ACTION_FAILED:throw new Error(o["progress.status.actionFailedNoCode"]());default:var t=e.status;throw new Error(o["progress.status.unknownStatusCode"](t))}},Object.defineProperty(e,"__esModule",{value:!0})}); |
@@ -5,4 +5,5 @@ import { Translation } from './types'; | ||
* @description Get humanized progress status explanation result | ||
* @throws {Error} Throws an Error if unknown status is provided or code is required and missing | ||
*/ | ||
export declare function translateProgress(message: ProgressMessage): Translation | undefined; | ||
export declare function translateProgress(message: ProgressMessage): Translation; | ||
declare type ProgressMessage = { | ||
@@ -9,0 +10,0 @@ status?: typeof PROGRESS_STATUS.ACTION_FAILED; |
@@ -39,15 +39,18 @@ export declare const texts: Readonly<{ | ||
'startupError.playstationPlatformError': () => "Cannot continue: PlayStation 4 driver has failed"; | ||
'startupError.playstationPlatformError.desc': () => "PlayStation 4 driver has misbehaved. TODO"; | ||
'startupError.playstationPlatformError.desc': () => "PlayStation 4 driver has misbehaved. Please verify that the device is online and it's current IP address is correctly specified in Suitest. If nothing helps try rebooting the device and restarting SuitestDrive. If the local IP of the device changes, make sure to set up a static IP for the device."; | ||
'startupError.planLimitExceeded': () => "Application or user limit has been exceeded"; | ||
'startupError.planLimitExceeded.desc': () => "Looks like you have reached the limit of applications or users, check your [billing section](https://the.suite.st/preferences/billing) to increase your plan. Please contact [sales@suite.st](sales@suite.st) if you require help with your plan."; | ||
'progress.status.openingApp': () => "Trying to open app..."; | ||
'progress.status.closingApp': () => "Trying to close app..."; | ||
'progress.status.bootingDevice': () => "Running the boot sequence defined for the device..."; | ||
'startupError.unknownReason': (reason: string) => string; | ||
'progress.status.openingApp': () => "Trying to open app…"; | ||
'progress.status.closingApp': () => "Trying to close app…"; | ||
'progress.status.bootingDevice': () => "Running the boot sequence defined for the device…"; | ||
'progress.status.needManual': () => "Paused. For this platform, install and open the application manually."; | ||
'progress.status.recoveringID': () => "Trying to recover Suitest device ID..."; | ||
'progress.status.waitingForConnectionFromBootstrap': () => "Waiting for connection from the Suitest app on device..."; | ||
'progress.status.waitingForConnectionFromIL': () => "Waiting for connection from the instrumentation library..."; | ||
'progress.status.unistallingApp': () => "Uninstalling app..."; | ||
'progress.status.uploadingAndInstallingApp': () => "Uploading and installing app..."; | ||
'progress.status.recoveringID': () => "Trying to recover Suitest device ID…"; | ||
'progress.status.waitingForConnectionFromBootstrap': () => "Waiting for connection from the Suitest app on device…"; | ||
'progress.status.waitingForConnectionFromIL': () => "Waiting for connection from the instrumentation library…"; | ||
'progress.status.unistallingApp': () => "Uninstalling app…"; | ||
'progress.status.uploadingAndInstallingApp': () => "Uploading and installing app…"; | ||
'progress.status.unknownStatusCode': (code: string) => string; | ||
'progress.status.actionFailedNoCode': () => "A code is expected when receiving \"actionFailed\" progress status"; | ||
}>; | ||
export default texts; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
119843
1344
0
30