From bf1279984f4431b99fce255b7d4be5d9246dc1f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mati=20K=C3=A4rner?= Date: Mon, 19 Jul 2021 17:01:22 +0300 Subject: [PATCH] 13.0.2 --- commands/generateDocumentation.js | 4 +- docs/yml/capabilityManifest.yml | 25 ++++++++++ docs/yml/cruise_control.yml | 59 +++++++++++++++++++++++ docs/yml/driver_fatigue.yml | 40 ++++++++++++++++ docs/yml/heart_rate.yml | 28 +++++++++++ docs/yml/keyfob_position.yml | 40 ++++++++++++++++ docs/yml/remote_control.yml | 60 ++++++++++++++++++++++++ package-lock.json | 2 +- package.json | 2 +- src/Configuration/ResponseClass.js | 8 ---- src/Utils/CommandUtils.js | 5 -- test/capabilities/CruiseControl.spec.js | 33 +++++++++++++ test/capabilities/DriverFatigue.spec.js | 33 +++++++++++++ test/capabilities/HeartRate.spec.js | 33 +++++++++++++ test/capabilities/KeyfobPosition.spec.js | 33 +++++++++++++ test/capabilities/RemoteControl.spec.js | 33 +++++++++++++ 16 files changed, 420 insertions(+), 18 deletions(-) create mode 100644 docs/yml/cruise_control.yml create mode 100644 docs/yml/driver_fatigue.yml create mode 100644 docs/yml/heart_rate.yml create mode 100644 docs/yml/keyfob_position.yml create mode 100644 docs/yml/remote_control.yml create mode 100644 test/capabilities/CruiseControl.spec.js create mode 100644 test/capabilities/DriverFatigue.spec.js create mode 100644 test/capabilities/HeartRate.spec.js create mode 100644 test/capabilities/KeyfobPosition.spec.js create mode 100644 test/capabilities/RemoteControl.spec.js diff --git a/commands/generateDocumentation.js b/commands/generateDocumentation.js index dd57deb..a177ade 100644 --- a/commands/generateDocumentation.js +++ b/commands/generateDocumentation.js @@ -43,9 +43,7 @@ const DOCUMENTATION_DIRECTORY = path.resolve(__dirname, '../docs/yml'); */ async function buildDocumentation() { const supportedCapabilities = Object.values(Capabilities).filter( - capabilityConf => - !(capabilityConf.disabled_in || []).includes('web') && - !['failure_message'].includes(capabilityConf.name) + capabilityConf => !['failure_message'].includes(capabilityConf.name) ); await Promise.all( diff --git a/docs/yml/capabilityManifest.yml b/docs/yml/capabilityManifest.yml index c61dfe2..192e397 100644 --- a/docs/yml/capabilityManifest.yml +++ b/docs/yml/capabilityManifest.yml @@ -38,6 +38,11 @@ name_cased: crash name_pretty: Crash src: /docs/yml/crash.yml +- + name: cruise_control + name_cased: cruiseControl + name_pretty: 'Cruise Control' + src: /docs/yml/cruise_control.yml - name: dashboard_lights name_cased: dashboardLights @@ -53,6 +58,11 @@ name_cased: doors name_pretty: Doors src: /docs/yml/doors.yml +- + name: driver_fatigue + name_cased: driverFatigue + name_pretty: 'Driver Fatigue' + src: /docs/yml/driver_fatigue.yml - name: engine name_cased: engine @@ -73,6 +83,11 @@ name_cased: graphics name_pretty: Graphics src: /docs/yml/graphics.yml +- + name: heart_rate + name_cased: heartRate + name_pretty: 'Heart Rate' + src: /docs/yml/heart_rate.yml - name: historical name_cased: historical @@ -98,6 +113,11 @@ name_cased: ignition name_pretty: Ignition src: /docs/yml/ignition.yml +- + name: keyfob_position + name_cased: keyfobPosition + name_pretty: 'Keyfob Position' + src: /docs/yml/keyfob_position.yml - name: light_conditions name_cased: lightConditions @@ -163,6 +183,11 @@ name_cased: race name_pretty: Race src: /docs/yml/race.yml +- + name: remote_control + name_cased: remoteControl + name_pretty: 'Remote Control' + src: /docs/yml/remote_control.yml - name: rooftop_control name_cased: rooftopControl diff --git a/docs/yml/cruise_control.yml b/docs/yml/cruise_control.yml new file mode 100644 index 0000000..038351b --- /dev/null +++ b/docs/yml/cruise_control.yml @@ -0,0 +1,59 @@ +title: 'Cruise Control' +content: + - + title: 'getState([, propertyNames])' + id: getState + children: + - + declaration: "```javascript\nhmkit.commands.CruiseControl.getState()\n```" + parameters: + propertyNames: '(optional) Array of names of the properties you want returned.' + returns: CruiseControlResponse + example: "```javascript\nhmkit.telematics.sendCommand(\n hmkit.commands.CruiseControl.getState(),\n accessCertificate\n);\n```" + - + id: CruiseControlResponse + title: CruiseControlResponse + parameters: + cruiseControl: + data.value: '(String) (enum) ' + timestamp: (Date) + limiter: + data.value: '(String) (enum) ' + timestamp: (Date) + targetSpeed: + data.value: '(Number) (speed) The target speed' + timestamp: (Date) + adaptiveCruiseControl: + data.value: '(String) (enum) ' + timestamp: (Date) + accTargetSpeed: + data.value: '(Number) (speed) The target speed of the Adaptive Cruise Control' + timestamp: (Date) + example: "```json\n{\n \"cruiseControl\": {\n \"timestamp\": \"2021-06-01T15:48:04.887Z\",\n \"data\": {\n \"value\": \"active\"\n }\n },\n \"limiter\": {\n \"timestamp\": \"2021-06-01T15:48:04.887Z\",\n \"data\": {\n \"value\": \"higher_speed_requested\"\n }\n },\n \"targetSpeed\": {\n \"timestamp\": \"2021-06-01T15:48:04.887Z\",\n \"data\": {\n \"value\": 61,\n \"unit\": \"kilometers_per_hour\"\n }\n },\n \"adaptiveCruiseControl\": {\n \"timestamp\": \"2021-06-01T15:48:04.887Z\",\n \"data\": {\n \"value\": \"inactive\"\n }\n },\n \"accTargetSpeed\": {\n \"timestamp\": \"2021-06-01T15:48:04.887Z\",\n \"data\": {\n \"value\": 67,\n \"unit\": \"kilometers_per_hour\"\n }\n }\n}\n```" + - + title: 'getAvailability([, propertyNames])' + id: get-availability + children: + - + declaration: "```javascript\nhmkit.commands.CruiseControl.getAvailability()\n```" + parameters: + propertyNames: '(optional) Array of names of the properties you want returned.' + example: "```javascript\n// Get availability for all properties\nhmkit.telematics.sendCommand(\n hmkit.commands.CruiseControl.getAvailability(),\n accessCertificate\n);\n// Get availability for specific properties\nhmkit.telematics.sendCommand(\n hmkit.commands.CruiseControl.getAvailability(['cruise_control']),\n accessCertificate\n);\n```" + - + id: availability-response + title: Response + parameters: + availability: + updateRate.value: '(String) enum' + rateLimit.value: (Number) + rateLimit.unit: (String) + appliesPer.value: (String) + discussion: 'The response contains an availability object for each property, as shown in the example' + example: "```json\n{\n \"cruise_control\": {\n \"availability\": {\n \"updateRate\": {\n \"value\": \"trip_high\"\n },\n \"rateLimit\": {\n \"value\": 64,\n \"unit\": \"hertz\"\n },\n \"appliesPer\": {\n \"value\": \"vehicle\"\n }\n }\n }\n}\n```" + - + id: activateDeactivateCruiseControl + title: 'activateDeactivateCruiseControl({ cruiseControl, targetSpeed })' + parameters: + cruiseControl: '(String) (enum) ' + targetSpeed: '(Number) (speed) The target speed' + example: "```javascript\nhmkit.telematics.sendCommand(\n hmkit.commands.CruiseControl.activateDeactivateCruiseControl({\n \"cruiseControl\": \"active\",\n \"targetSpeed\": {\n \"kilometers_per_hour\": 61\n }\n }),\n accessCertificate\n);\n```" diff --git a/docs/yml/driver_fatigue.yml b/docs/yml/driver_fatigue.yml new file mode 100644 index 0000000..334ea9c --- /dev/null +++ b/docs/yml/driver_fatigue.yml @@ -0,0 +1,40 @@ +title: 'Driver Fatigue' +content: + - + title: 'getState([, propertyNames])' + id: getState + children: + - + declaration: "```javascript\nhmkit.commands.DriverFatigue.getState()\n```" + parameters: + propertyNames: '(optional) Array of names of the properties you want returned.' + returns: DriverFatigueResponse + example: "```javascript\nhmkit.telematics.sendCommand(\n hmkit.commands.DriverFatigue.getState(),\n accessCertificate\n);\n```" + - + id: DriverFatigueResponse + title: DriverFatigueResponse + parameters: + detectedFatigueLevel: + data.value: '(String) (enum) ' + timestamp: (Date) + example: "```json\n{\n \"detectedFatigueLevel\": {\n \"timestamp\": \"2021-06-01T15:48:04.887Z\",\n \"data\": {\n \"value\": \"pause_recommended\"\n }\n }\n}\n```" + - + title: 'getAvailability([, propertyNames])' + id: get-availability + children: + - + declaration: "```javascript\nhmkit.commands.DriverFatigue.getAvailability()\n```" + parameters: + propertyNames: '(optional) Array of names of the properties you want returned.' + example: "```javascript\n// Get availability for all properties\nhmkit.telematics.sendCommand(\n hmkit.commands.DriverFatigue.getAvailability(),\n accessCertificate\n);\n// Get availability for specific properties\nhmkit.telematics.sendCommand(\n hmkit.commands.DriverFatigue.getAvailability(['detected_fatigue_level']),\n accessCertificate\n);\n```" + - + id: availability-response + title: Response + parameters: + availability: + updateRate.value: '(String) enum' + rateLimit.value: (Number) + rateLimit.unit: (String) + appliesPer.value: (String) + discussion: 'The response contains an availability object for each property, as shown in the example' + example: "```json\n{\n \"detected_fatigue_level\": {\n \"availability\": {\n \"updateRate\": {\n \"value\": \"trip_high\"\n },\n \"rateLimit\": {\n \"value\": 64,\n \"unit\": \"hertz\"\n },\n \"appliesPer\": {\n \"value\": \"vehicle\"\n }\n }\n }\n}\n```" diff --git a/docs/yml/heart_rate.yml b/docs/yml/heart_rate.yml new file mode 100644 index 0000000..1cd921d --- /dev/null +++ b/docs/yml/heart_rate.yml @@ -0,0 +1,28 @@ +title: 'Heart Rate' +content: + - + title: 'getAvailability([, propertyNames])' + id: get-availability + children: + - + declaration: "```javascript\nhmkit.commands.HeartRate.getAvailability()\n```" + parameters: + propertyNames: '(optional) Array of names of the properties you want returned.' + example: "```javascript\n// Get availability for all properties\nhmkit.telematics.sendCommand(\n hmkit.commands.HeartRate.getAvailability(),\n accessCertificate\n);\n// Get availability for specific properties\nhmkit.telematics.sendCommand(\n hmkit.commands.HeartRate.getAvailability(['status']),\n accessCertificate\n);\n```" + - + id: availability-response + title: Response + parameters: + availability: + updateRate.value: '(String) enum' + rateLimit.value: (Number) + rateLimit.unit: (String) + appliesPer.value: (String) + discussion: 'The response contains an availability object for each property, as shown in the example' + example: "```json\n{\n \"status\": {\n \"availability\": {\n \"updateRate\": {\n \"value\": \"trip_high\"\n },\n \"rateLimit\": {\n \"value\": 64,\n \"unit\": \"hertz\"\n },\n \"appliesPer\": {\n \"value\": \"vehicle\"\n }\n }\n }\n}\n```" + - + id: sendHeartRate + title: 'sendHeartRate({ heartRate })' + parameters: + heartRate: '(Number) (frequency) ' + example: "```javascript\nhmkit.telematics.sendCommand(\n hmkit.commands.HeartRate.sendHeartRate({\n \"heartRate\": {\n \"times_per_minute\": 64\n }\n }),\n accessCertificate\n);\n```" diff --git a/docs/yml/keyfob_position.yml b/docs/yml/keyfob_position.yml new file mode 100644 index 0000000..640986b --- /dev/null +++ b/docs/yml/keyfob_position.yml @@ -0,0 +1,40 @@ +title: 'Keyfob Position' +content: + - + title: 'getKeyfobPosition([, propertyNames])' + id: getKeyfobPosition + children: + - + declaration: "```javascript\nhmkit.commands.KeyfobPosition.getKeyfobPosition()\n```" + parameters: + propertyNames: '(optional) Array of names of the properties you want returned.' + returns: KeyfobPositionResponse + example: "```javascript\nhmkit.telematics.sendCommand(\n hmkit.commands.KeyfobPosition.getKeyfobPosition(),\n accessCertificate\n);\n```" + - + id: KeyfobPositionResponse + title: KeyfobPositionResponse + parameters: + location: + data.value: '(String) (enum) ' + timestamp: (Date) + example: "```json\n{\n \"location\": {\n \"timestamp\": \"2021-06-01T15:48:04.887Z\",\n \"data\": {\n \"value\": \"inside_car\"\n }\n }\n}\n```" + - + title: 'getAvailability([, propertyNames])' + id: get-availability + children: + - + declaration: "```javascript\nhmkit.commands.KeyfobPosition.getAvailability()\n```" + parameters: + propertyNames: '(optional) Array of names of the properties you want returned.' + example: "```javascript\n// Get availability for all properties\nhmkit.telematics.sendCommand(\n hmkit.commands.KeyfobPosition.getAvailability(),\n accessCertificate\n);\n// Get availability for specific properties\nhmkit.telematics.sendCommand(\n hmkit.commands.KeyfobPosition.getAvailability(['location']),\n accessCertificate\n);\n```" + - + id: availability-response + title: Response + parameters: + availability: + updateRate.value: '(String) enum' + rateLimit.value: (Number) + rateLimit.unit: (String) + appliesPer.value: (String) + discussion: 'The response contains an availability object for each property, as shown in the example' + example: "```json\n{\n \"location\": {\n \"availability\": {\n \"updateRate\": {\n \"value\": \"trip_high\"\n },\n \"rateLimit\": {\n \"value\": 64,\n \"unit\": \"hertz\"\n },\n \"appliesPer\": {\n \"value\": \"vehicle\"\n }\n }\n }\n}\n```" diff --git a/docs/yml/remote_control.yml b/docs/yml/remote_control.yml new file mode 100644 index 0000000..9ca8fb9 --- /dev/null +++ b/docs/yml/remote_control.yml @@ -0,0 +1,60 @@ +title: 'Remote Control' +content: + - + title: 'getControlState([, propertyNames])' + id: getControlState + children: + - + declaration: "```javascript\nhmkit.commands.RemoteControl.getControlState()\n```" + parameters: + propertyNames: '(optional) Array of names of the properties you want returned.' + returns: RemoteControlResponse + example: "```javascript\nhmkit.telematics.sendCommand(\n hmkit.commands.RemoteControl.getControlState(),\n accessCertificate\n);\n```" + - + id: RemoteControlResponse + title: RemoteControlResponse + parameters: + controlMode: + data.value: '(String) (enum) ' + timestamp: (Date) + angle: + data.value: '(Number) (angle) Wheel base angle' + timestamp: (Date) + example: "```json\n{\n \"controlMode\": {\n \"timestamp\": \"2021-06-01T15:48:04.887Z\",\n \"data\": {\n \"value\": \"started\"\n }\n },\n \"angle\": {\n \"timestamp\": \"2021-06-01T15:48:04.887Z\",\n \"data\": {\n \"value\": 50,\n \"unit\": \"degrees\"\n }\n }\n}\n```" + - + title: 'getAvailability([, propertyNames])' + id: get-availability + children: + - + declaration: "```javascript\nhmkit.commands.RemoteControl.getAvailability()\n```" + parameters: + propertyNames: '(optional) Array of names of the properties you want returned.' + example: "```javascript\n// Get availability for all properties\nhmkit.telematics.sendCommand(\n hmkit.commands.RemoteControl.getAvailability(),\n accessCertificate\n);\n// Get availability for specific properties\nhmkit.telematics.sendCommand(\n hmkit.commands.RemoteControl.getAvailability(['control_mode']),\n accessCertificate\n);\n```" + - + id: availability-response + title: Response + parameters: + availability: + updateRate.value: '(String) enum' + rateLimit.value: (Number) + rateLimit.unit: (String) + appliesPer.value: (String) + discussion: 'The response contains an availability object for each property, as shown in the example' + example: "```json\n{\n \"control_mode\": {\n \"availability\": {\n \"updateRate\": {\n \"value\": \"trip_high\"\n },\n \"rateLimit\": {\n \"value\": 64,\n \"unit\": \"hertz\"\n },\n \"appliesPer\": {\n \"value\": \"vehicle\"\n }\n }\n }\n}\n```" + - + id: controlCommand + title: 'controlCommand({ angle, speed })' + parameters: + angle: '(Number) (angle) Wheel base angle' + speed: '(Number) (speed) Target speed' + example: "```javascript\nhmkit.telematics.sendCommand(\n hmkit.commands.RemoteControl.controlCommand({\n \"angle\": {\n \"degrees\": 50\n },\n \"speed\": {\n \"kilometers_per_hour\": 5\n }\n }),\n accessCertificate\n);\n```" + - + id: startControl + title: startControl() + parameters: {} + example: "```javascript\nhmkit.telematics.sendCommand(\n hmkit.commands.RemoteControl.startControl({}),\n accessCertificate\n);\n```" + - + id: stopControl + title: stopControl() + parameters: {} + example: "```javascript\nhmkit.telematics.sendCommand(\n hmkit.commands.RemoteControl.stopControl({}),\n accessCertificate\n);\n```" diff --git a/package-lock.json b/package-lock.json index a0870e4..9e1185b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "hmkit", - "version": "13.0.1", + "version": "13.0.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 0941f3a..50f2aec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hmkit", - "version": "13.0.1", + "version": "13.0.2", "description": "High Mobility SDK for Node.js", "homepage": "https://github.com/highmobility/hmkit-node", "bugs": "https://github.com/highmobility/hmkit-node/issues", diff --git a/src/Configuration/ResponseClass.js b/src/Configuration/ResponseClass.js index 068eca6..dad63b7 100644 --- a/src/Configuration/ResponseClass.js +++ b/src/Configuration/ResponseClass.js @@ -30,15 +30,7 @@ import capabilitiesConfiguration from '../Configuration/capabilities.json'; import { capitalize } from '../Utils/Helpers'; import EmptyResponse from '../Responses/EmptyResponse'; -const DISABLED_FOR_CATEGORIES = ['universal']; -const WEB_CONNECTION_TYPE = 'web'; - const ResponseClasses = Object.values(capabilitiesConfiguration) - .filter( - capabilityConf => - !(capabilityConf.disabled_in || []).includes(WEB_CONNECTION_TYPE) && - !DISABLED_FOR_CATEGORIES.includes(capabilityConf.category) - ) .reduce((responseClasses, capabilityConf) => { const capitalizedName = capitalize(capabilityConf.name_cased); const { identifier } = capabilityConf; diff --git a/src/Utils/CommandUtils.js b/src/Utils/CommandUtils.js index 023f3d2..1b2ae2c 100644 --- a/src/Utils/CommandUtils.js +++ b/src/Utils/CommandUtils.js @@ -57,7 +57,6 @@ export const CommandType = { Setter: 'SET', }; -const WEB_CONNECTION_TYPE = 'web'; const commands = buildCommands(); function buildAvailabilityGetter(capabilityConf) { @@ -528,10 +527,6 @@ function encodePropertyValue(value, encodingFunc) { export function buildCommands() { return Object.values(capabilitiesConfiguration) - .filter( - capabilityConf => - !(capabilityConf.disabled_in || []).includes(WEB_CONNECTION_TYPE) - ) .reduce((allConf, capabilityConf) => { const buildGettersAndSetters = !CAPABILITIES_WITH_NO_COMMANDS.includes( capabilityConf.name diff --git a/test/capabilities/CruiseControl.spec.js b/test/capabilities/CruiseControl.spec.js new file mode 100644 index 0000000..43e7cc5 --- /dev/null +++ b/test/capabilities/CruiseControl.spec.js @@ -0,0 +1,33 @@ +/* + * The MIT License + * + * Copyright (c) 2014- High-Mobility GmbH (https://high-mobility.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * CruiseControl.spec.js + * + * Created by Mati Kärner on 19/07/2021. + */ + +import getHmkit from '../testutils/getHmkit'; +import { describeTest } from '../testutils/capabilityTests'; + +const hmkit = getHmkit(); +describeTest('CruiseControl', hmkit.commands.CruiseControl); diff --git a/test/capabilities/DriverFatigue.spec.js b/test/capabilities/DriverFatigue.spec.js new file mode 100644 index 0000000..9b9ea4b --- /dev/null +++ b/test/capabilities/DriverFatigue.spec.js @@ -0,0 +1,33 @@ +/* + * The MIT License + * + * Copyright (c) 2014- High-Mobility GmbH (https://high-mobility.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * DriverFatigue.spec.js + * + * Created by Mati Kärner on 19/07/2021. + */ + +import getHmkit from '../testutils/getHmkit'; +import { describeTest } from '../testutils/capabilityTests'; + +const hmkit = getHmkit(); +describeTest('DriverFatigue', hmkit.commands.DriverFatigue); diff --git a/test/capabilities/HeartRate.spec.js b/test/capabilities/HeartRate.spec.js new file mode 100644 index 0000000..77cd390 --- /dev/null +++ b/test/capabilities/HeartRate.spec.js @@ -0,0 +1,33 @@ +/* + * The MIT License + * + * Copyright (c) 2014- High-Mobility GmbH (https://high-mobility.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * HeartRate.spec.js + * + * Created by Mati Kärner on 19/07/2021. + */ + +import getHmkit from '../testutils/getHmkit'; +import { describeTest } from '../testutils/capabilityTests'; + +const hmkit = getHmkit(); +describeTest('HeartRate', hmkit.commands.HeartRate); diff --git a/test/capabilities/KeyfobPosition.spec.js b/test/capabilities/KeyfobPosition.spec.js new file mode 100644 index 0000000..792095b --- /dev/null +++ b/test/capabilities/KeyfobPosition.spec.js @@ -0,0 +1,33 @@ +/* + * The MIT License + * + * Copyright (c) 2014- High-Mobility GmbH (https://high-mobility.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * KeyfobPosition.spec.js + * + * Created by Mati Kärner on 19/07/2021. + */ + +import getHmkit from '../testutils/getHmkit'; +import { describeTest } from '../testutils/capabilityTests'; + +const hmkit = getHmkit(); +describeTest('KeyfobPosition', hmkit.commands.KeyfobPosition); diff --git a/test/capabilities/RemoteControl.spec.js b/test/capabilities/RemoteControl.spec.js new file mode 100644 index 0000000..5da2364 --- /dev/null +++ b/test/capabilities/RemoteControl.spec.js @@ -0,0 +1,33 @@ +/* + * The MIT License + * + * Copyright (c) 2014- High-Mobility GmbH (https://high-mobility.com) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * RemoteControl.spec.js + * + * Created by Mati Kärner on 19/07/2021. + */ + +import getHmkit from '../testutils/getHmkit'; +import { describeTest } from '../testutils/capabilityTests'; + +const hmkit = getHmkit(); +describeTest('RemoteControl', hmkit.commands.RemoteControl);