提交 af565d71 编写于 作者: N nan-xiansen

【startup_stanard】【master】fix docs issues.

Signed-off-by: Nnan-xiansen <nanjinbin@huawei.com>
Change-Id: I6d546777ebf287ddc5c4c3889b71bffd13fadd92
上级 971b4768
...@@ -35,6 +35,7 @@ export default { ...@@ -35,6 +35,7 @@ export default {
core.init() core.init()
const configService = core.getDefaultService('config') const configService = core.getDefaultService('config')
this.timeout = 5000
configService.setConfig(this) configService.setConfig(this)
require('../../test/List.test') require('../../test/List.test')
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
*/ */
// @ts-nocheck // @ts-nocheck
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
import deviceinfo from '@ohos.deviceInfo' import deviceinfo from '@ohos.deviceInfo'
describe('DeviceInfoTest', function () { describe('DeviceInfoTest', function () {
...@@ -57,7 +57,7 @@ describe('DeviceInfoTest', function () { ...@@ -57,7 +57,7 @@ describe('DeviceInfoTest', function () {
console.info('the value of the deviceType is :' + deviceTypeInfo); console.info('the value of the deviceType is :' + deviceTypeInfo);
expect(deviceTypeInfo).assertInstanceOf('String'); expect(deviceTypeInfo).assertInstanceOf('String');
if (deviceTypeInfo !="" && deviceTypeInfo != null && deviceTypeInfo != undefined) { if (deviceTypeInfo != "" && deviceTypeInfo != null && deviceTypeInfo != undefined) {
ret = true; ret = true;
} }
expect(ret).assertTrue() expect(ret).assertTrue()
...@@ -79,7 +79,7 @@ describe('DeviceInfoTest', function () { ...@@ -79,7 +79,7 @@ describe('DeviceInfoTest', function () {
console.info('the value of the manufactureInfo is :' + manufactureInfo); console.info('the value of the manufactureInfo is :' + manufactureInfo);
expect(manufactureInfo).assertInstanceOf('String'); expect(manufactureInfo).assertInstanceOf('String');
if (manufactureInfo !="" && manufactureInfo != null && manufactureInfo != undefined){ if (manufactureInfo != "" && manufactureInfo != null && manufactureInfo != undefined) {
ret = true; ret = true;
} }
expect(ret).assertTrue(); expect(ret).assertTrue();
...@@ -87,30 +87,30 @@ describe('DeviceInfoTest', function () { ...@@ -87,30 +87,30 @@ describe('DeviceInfoTest', function () {
}) })
/** /**
* @tc.number SUB_STARTUP_JS_DEVCEINFO_0300 * @tc.number SUB_STARTUP_JS_DEVCEINFO_0300
* @tc.name testGetProductBrand01 * @tc.name testGetBrand01
* @tc.desc Get the product brand represented by a string. * @tc.desc Get the device brand represented by a string and the return value is not null.
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
*/ */
it('device_info_test_003', 0, function () { it('device_info_test_003', 0, function () {
console.info('testGetProductBrand01 start'); console.info('testGetDeviceBrand01 start');
let ret = false; let ret = false;
let brandInfo = deviceinfo.brand; let brandInfo = deviceinfo.brand;
console.info('the value of the deviceinfo brand is :' + brandInfo); console.info('the value of the device brand is :' + brandInfo);
expect(brandInfo).assertInstanceOf('String'); expect(brandInfo).assertInstanceOf('String');
if (brandInfo !="" && brandInfo != null && brandInfo != undefined){ if (brandInfo != "" && brandInfo != null && brandInfo != undefined) {
ret = true; ret = true;
} }
expect(ret).assertTrue(); expect(ret).assertTrue();
console.info('testGetProductBrand01 :end'); console.info('testGetDeviceBrand01 :end');
}) })
/** /**
* @tc.number SUB_STARTUP_JS_DEVCEINFO_0400 * @tc.number SUB_STARTUP_JS_DEVCEINFO_0400
* @tc.name testGetMarketName01 * @tc.name testGetMarketName01
* @tc.desc Get the external product family name represented by a string. * @tc.desc Get the external product family name represented by a string and the return value is not null.
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
...@@ -122,7 +122,7 @@ describe('DeviceInfoTest', function () { ...@@ -122,7 +122,7 @@ describe('DeviceInfoTest', function () {
console.info('the value of the deviceinfo marketName is :' + marketNameInfo); console.info('the value of the deviceinfo marketName is :' + marketNameInfo);
expect(marketNameInfo).assertInstanceOf('String'); expect(marketNameInfo).assertInstanceOf('String');
if(marketNameInfo !="" && marketNameInfo != null && marketNameInfo != undefined){ if (marketNameInfo != "" && marketNameInfo != null && marketNameInfo != undefined) {
ret = true; ret = true;
} }
expect(ret).assertTrue(); expect(ret).assertTrue();
...@@ -132,7 +132,7 @@ describe('DeviceInfoTest', function () { ...@@ -132,7 +132,7 @@ describe('DeviceInfoTest', function () {
/** /**
* @tc.number SUB_STARTUP_JS_DEVCEINFO_0500 * @tc.number SUB_STARTUP_JS_DEVCEINFO_0500
* @tc.name testGetProductSeries01 * @tc.name testGetProductSeries01
* @tc.desc Get the product series represented by a string. * @tc.desc Get the product series represented by a string and the return value is not null.
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
...@@ -144,7 +144,7 @@ describe('DeviceInfoTest', function () { ...@@ -144,7 +144,7 @@ describe('DeviceInfoTest', function () {
console.info('the value of the deviceinfo productSeries is :' + productSeriesInfo); console.info('the value of the deviceinfo productSeries is :' + productSeriesInfo);
expect(productSeriesInfo).assertInstanceOf('String'); expect(productSeriesInfo).assertInstanceOf('String');
if(productSeriesInfo !="" && productSeriesInfo != null && productSeriesInfo != undefined){ if (productSeriesInfo != "" && productSeriesInfo != null && productSeriesInfo != undefined) {
ret = true; ret = true;
} }
expect(ret).assertTrue(); expect(ret).assertTrue();
...@@ -154,7 +154,7 @@ describe('DeviceInfoTest', function () { ...@@ -154,7 +154,7 @@ describe('DeviceInfoTest', function () {
/** /**
* @tc.number SUB_STARTUP_JS_DEVCEINFO_0600 * @tc.number SUB_STARTUP_JS_DEVCEINFO_0600
* @tc.name testGetProductModel01 * @tc.name testGetProductModel01
* @tc.desc Get the internal software sub-model represented by a string. * @tc.desc Get the internal software sub-model represented by a string and the return value is not null.
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
...@@ -166,8 +166,8 @@ describe('DeviceInfoTest', function () { ...@@ -166,8 +166,8 @@ describe('DeviceInfoTest', function () {
console.info('the value of the deviceinfo productModel is :' + productModelInfo); console.info('the value of the deviceinfo productModel is :' + productModelInfo);
expect(productModelInfo).assertInstanceOf('String'); expect(productModelInfo).assertInstanceOf('String');
if(productModelInfo !="" && productModelInfo != null && productModelInfo != undefined){ if (productModelInfo != "" && productModelInfo != null && productModelInfo != undefined) {
ret =true; ret = true;
} }
expect(ret).assertTrue(); expect(ret).assertTrue();
console.info('testGetProductModel01 :end'); console.info('testGetProductModel01 :end');
...@@ -176,7 +176,7 @@ describe('DeviceInfoTest', function () { ...@@ -176,7 +176,7 @@ describe('DeviceInfoTest', function () {
/** /**
* @tc.number SUB_STARTUP_JS_DEVCEINFO_0700 * @tc.number SUB_STARTUP_JS_DEVCEINFO_0700
* @tc.name testGetSoftwareModel01 * @tc.name testGetSoftwareModel01
* @tc.desc Get the internal software sub-model represented by a string. * @tc.desc Get the internal software sub-model represented by a string and the return value is not null.
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
...@@ -188,7 +188,7 @@ describe('DeviceInfoTest', function () { ...@@ -188,7 +188,7 @@ describe('DeviceInfoTest', function () {
console.info('the value of the deviceinfo softwareModel is :' + softwareModelInfo); console.info('the value of the deviceinfo softwareModel is :' + softwareModelInfo);
expect(softwareModelInfo).assertInstanceOf('String'); expect(softwareModelInfo).assertInstanceOf('String');
if(softwareModelInfo !="" && softwareModelInfo != null && softwareModelInfo != undefined){ if (softwareModelInfo != "" && softwareModelInfo != null && softwareModelInfo != undefined) {
ret = true; ret = true;
} }
expect(ret).assertTrue(); expect(ret).assertTrue();
...@@ -198,7 +198,7 @@ describe('DeviceInfoTest', function () { ...@@ -198,7 +198,7 @@ describe('DeviceInfoTest', function () {
/** /**
* @tc.number SUB_STARTUP_JS_DEVCEINFO_0800 * @tc.number SUB_STARTUP_JS_DEVCEINFO_0800
* @tc.name testGetHardWareModel01 * @tc.name testGetHardWareModel01
* @tc.desc Get the hardware version represented by a string. * @tc.desc Get the hardware version represented by a string and the return value is not null.
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
...@@ -210,7 +210,7 @@ describe('DeviceInfoTest', function () { ...@@ -210,7 +210,7 @@ describe('DeviceInfoTest', function () {
console.info('the value of the deviceinfo hardwareModel is :' + hardwareModelInfo); console.info('the value of the deviceinfo hardwareModel is :' + hardwareModelInfo);
expect(hardwareModelInfo).assertInstanceOf('String'); expect(hardwareModelInfo).assertInstanceOf('String');
if(hardwareModelInfo !="" && hardwareModelInfo != null && hardwareModelInfo != undefined){ if (hardwareModelInfo != "" && hardwareModelInfo != null && hardwareModelInfo != undefined) {
ret = true; ret = true;
} }
expect(ret).assertTrue(); expect(ret).assertTrue();
...@@ -220,7 +220,7 @@ describe('DeviceInfoTest', function () { ...@@ -220,7 +220,7 @@ describe('DeviceInfoTest', function () {
/** /**
* @tc.number SUB_STARTUP_JS_DEVCEINFO_0900 * @tc.number SUB_STARTUP_JS_DEVCEINFO_0900
* @tc.name testGetHardWareProfile01 * @tc.name testGetHardWareProfile01
* @tc.desc Get the hardware profile represented by a string. * @tc.desc Get the hardware profile represented by a string and the return value is not null.
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
...@@ -232,7 +232,7 @@ describe('DeviceInfoTest', function () { ...@@ -232,7 +232,7 @@ describe('DeviceInfoTest', function () {
console.info('the value of the deviceinfo hardwareProfile is :' + hardwareProfileInfo); console.info('the value of the deviceinfo hardwareProfile is :' + hardwareProfileInfo);
expect(hardwareProfileInfo).assertInstanceOf('String'); expect(hardwareProfileInfo).assertInstanceOf('String');
if(hardwareProfileInfo !="" && hardwareProfileInfo != null && hardwareProfileInfo != undefined){ if (hardwareProfileInfo != "" && hardwareProfileInfo != null && hardwareProfileInfo != undefined) {
ret = true; ret = true;
} }
expect(ret).assertTrue(); expect(ret).assertTrue();
...@@ -242,7 +242,7 @@ describe('DeviceInfoTest', function () { ...@@ -242,7 +242,7 @@ describe('DeviceInfoTest', function () {
/** /**
* @tc.number SUB_STARTUP_JS_DEVCEINFO_0110 * @tc.number SUB_STARTUP_JS_DEVCEINFO_0110
* @tc.name testGetSerial01 * @tc.name testGetSerial01
* @tc.desc Get the device serial number represented by a string. * @tc.desc Get the device serial number represented by a string and the return value is not null.
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
...@@ -254,7 +254,7 @@ describe('DeviceInfoTest', function () { ...@@ -254,7 +254,7 @@ describe('DeviceInfoTest', function () {
console.info('the value of the deviceinfo serial is :' + serialInfo); console.info('the value of the deviceinfo serial is :' + serialInfo);
expect(serialInfo).assertInstanceOf('String'); expect(serialInfo).assertInstanceOf('String');
if(serialInfo !="" && serialInfo != null && serialInfo != undefined){ if (serialInfo != "" && serialInfo != null && serialInfo != undefined) {
ret = true; ret = true;
} }
expect(ret).assertTrue(); expect(ret).assertTrue();
...@@ -264,7 +264,7 @@ describe('DeviceInfoTest', function () { ...@@ -264,7 +264,7 @@ describe('DeviceInfoTest', function () {
/** /**
* @tc.number SUB_STARTUP_JS_DEVCEINFO_0120 * @tc.number SUB_STARTUP_JS_DEVCEINFO_0120
* @tc.name testGetBootLoaderVersion01 * @tc.name testGetBootLoaderVersion01
* @tc.desc Get the bootloader version number represented by a string. * @tc.desc Get the bootloader version number represented by a string and the return value is not null.
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
...@@ -276,7 +276,7 @@ describe('DeviceInfoTest', function () { ...@@ -276,7 +276,7 @@ describe('DeviceInfoTest', function () {
console.info('the value of the deviceinfo bootloaderVersion is :' + bootloaderVersionInfo); console.info('the value of the deviceinfo bootloaderVersion is :' + bootloaderVersionInfo);
expect(bootloaderVersionInfo).assertInstanceOf('String'); expect(bootloaderVersionInfo).assertInstanceOf('String');
if(bootloaderVersionInfo !="" && bootloaderVersionInfo != null && bootloaderVersionInfo != undefined){ if (bootloaderVersionInfo != "" && bootloaderVersionInfo != null && bootloaderVersionInfo != undefined) {
ret = true; ret = true;
} }
expect(ret).assertTrue(); expect(ret).assertTrue();
...@@ -286,7 +286,7 @@ describe('DeviceInfoTest', function () { ...@@ -286,7 +286,7 @@ describe('DeviceInfoTest', function () {
/** /**
* @tc.number SUB_STARTUP_JS_DEVCEINFO_0130 * @tc.number SUB_STARTUP_JS_DEVCEINFO_0130
* @tc.name testGetabiList01 * @tc.name testGetabiList01
* @tc.desc Get the instruction set supported by the system. * @tc.desc Get the instruction set supported by the system and the return value is not null.
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
...@@ -298,7 +298,7 @@ describe('DeviceInfoTest', function () { ...@@ -298,7 +298,7 @@ describe('DeviceInfoTest', function () {
console.info('the value of the deviceinfo abiList is :' + abiListInfo); console.info('the value of the deviceinfo abiList is :' + abiListInfo);
expect(abiListInfo).assertInstanceOf('String'); expect(abiListInfo).assertInstanceOf('String');
if(abiListInfo !="" && abiListInfo != null && abiListInfo != undefined){ if (abiListInfo != "" && abiListInfo != null && abiListInfo != undefined) {
ret = true; ret = true;
} }
expect(ret).assertTrue(); expect(ret).assertTrue();
...@@ -307,8 +307,8 @@ describe('DeviceInfoTest', function () { ...@@ -307,8 +307,8 @@ describe('DeviceInfoTest', function () {
/** /**
* @tc.number SUB_STARTUP_JS_DEVCEINFO_0140 * @tc.number SUB_STARTUP_JS_DEVCEINFO_0140
* @tc.name testGetabiList01 * @tc.name testGetSecurityPatchTag01
* @tc.desc Get the security patch level represented by a string. * @tc.desc Get the security patch level represented by a string and the return value is not null.
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
...@@ -320,7 +320,7 @@ describe('DeviceInfoTest', function () { ...@@ -320,7 +320,7 @@ describe('DeviceInfoTest', function () {
console.info('the value of the deviceinfo securityPatchTag is :' + securityPatchTagInfo); console.info('the value of the deviceinfo securityPatchTag is :' + securityPatchTagInfo);
expect(securityPatchTagInfo).assertInstanceOf('String'); expect(securityPatchTagInfo).assertInstanceOf('String');
if(securityPatchTagInfo !="" && securityPatchTagInfo != null && securityPatchTagInfo != undefined){ if (securityPatchTagInfo != "" && securityPatchTagInfo != null && securityPatchTagInfo != undefined) {
ret = true; ret = true;
} }
expect(ret).assertTrue(); expect(ret).assertTrue();
...@@ -329,8 +329,8 @@ describe('DeviceInfoTest', function () { ...@@ -329,8 +329,8 @@ describe('DeviceInfoTest', function () {
/** /**
* @tc.number SUB_STARTUP_JS_DEVCEINFO_0150 * @tc.number SUB_STARTUP_JS_DEVCEINFO_0150
* @tc.name testGetabiList01 * @tc.name testGetDisplayVersion01
* @tc.desc Get the version number visible to users represented by a string. * @tc.desc Get the product version represented by a string and the return value is not null.
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
...@@ -342,7 +342,7 @@ describe('DeviceInfoTest', function () { ...@@ -342,7 +342,7 @@ describe('DeviceInfoTest', function () {
console.info('the value of the deviceinfo displayVersion is :' + displayVersionInfo); console.info('the value of the deviceinfo displayVersion is :' + displayVersionInfo);
expect(displayVersionInfo).assertInstanceOf('String'); expect(displayVersionInfo).assertInstanceOf('String');
if(displayVersionInfo !="" && displayVersionInfo != null && displayVersionInfo != undefined){ if (displayVersionInfo != "" && displayVersionInfo != null && displayVersionInfo != undefined) {
ret = true; ret = true;
} }
expect(ret).assertTrue(); expect(ret).assertTrue();
...@@ -352,7 +352,7 @@ describe('DeviceInfoTest', function () { ...@@ -352,7 +352,7 @@ describe('DeviceInfoTest', function () {
/** /**
* @tc.number SUB_STARTUP_JS_DEVCEINFO_0160 * @tc.number SUB_STARTUP_JS_DEVCEINFO_0160
* @tc.name testGetIncrementalVersion01 * @tc.name testGetIncrementalVersion01
* @tc.desc Get the difference version number represented by a string. * @tc.desc Get the incremental version represented by a string and the return value is not null.
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
...@@ -364,7 +364,7 @@ describe('DeviceInfoTest', function () { ...@@ -364,7 +364,7 @@ describe('DeviceInfoTest', function () {
console.info('the value of the deviceinfo incrementalVersion is :' + incrementalVersionInfo); console.info('the value of the deviceinfo incrementalVersion is :' + incrementalVersionInfo);
expect(incrementalVersionInfo).assertInstanceOf('String'); expect(incrementalVersionInfo).assertInstanceOf('String');
if(incrementalVersionInfo !="" && incrementalVersionInfo != null && incrementalVersionInfo != undefined){ if (incrementalVersionInfo != "" && incrementalVersionInfo != null && incrementalVersionInfo != undefined) {
ret = true; ret = true;
} }
expect(ret).assertTrue(); expect(ret).assertTrue();
...@@ -374,7 +374,7 @@ describe('DeviceInfoTest', function () { ...@@ -374,7 +374,7 @@ describe('DeviceInfoTest', function () {
/** /**
* @tc.number SUB_STARTUP_JS_DEVCEINFO_0170 * @tc.number SUB_STARTUP_JS_DEVCEINFO_0170
* @tc.name testGetOSReleaserType01 * @tc.name testGetOSReleaserType01
* @tc.desc Get the OS release type. * @tc.desc Get the OS release type represented by a string and the return value is not null.
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
...@@ -386,7 +386,7 @@ describe('DeviceInfoTest', function () { ...@@ -386,7 +386,7 @@ describe('DeviceInfoTest', function () {
console.info('the value of the deviceinfo osReleaseType is :' + osReleaseTypeInfo); console.info('the value of the deviceinfo osReleaseType is :' + osReleaseTypeInfo);
expect(osReleaseTypeInfo).assertInstanceOf('String'); expect(osReleaseTypeInfo).assertInstanceOf('String');
if(osReleaseTypeInfo !="" && osReleaseTypeInfo != null && osReleaseTypeInfo != undefined){ if (osReleaseTypeInfo != "" && osReleaseTypeInfo != null && osReleaseTypeInfo != undefined) {
ret = true; ret = true;
} }
expect(ret).assertTrue(); expect(ret).assertTrue();
...@@ -396,7 +396,7 @@ describe('DeviceInfoTest', function () { ...@@ -396,7 +396,7 @@ describe('DeviceInfoTest', function () {
/** /**
* @tc.number SUB_STARTUP_JS_DEVCEINFO_0180 * @tc.number SUB_STARTUP_JS_DEVCEINFO_0180
* @tc.name testGetOSFullName01 * @tc.name testGetOSFullName01
* @tc.desc Get the operating system full name. * @tc.desc Get the operating system full name and the return value is not null.
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
...@@ -408,7 +408,7 @@ describe('DeviceInfoTest', function () { ...@@ -408,7 +408,7 @@ describe('DeviceInfoTest', function () {
console.info('the value of the deviceinfo osFullName is :' + osFullNameInfo); console.info('the value of the deviceinfo osFullName is :' + osFullNameInfo);
expect(osFullNameInfo).assertInstanceOf('String'); expect(osFullNameInfo).assertInstanceOf('String');
if(osFullNameInfo !="" && osFullNameInfo != null && osFullNameInfo != undefined){ if (osFullNameInfo != "" && osFullNameInfo != null && osFullNameInfo != undefined) {
ret = true; ret = true;
} }
expect(ret).assertTrue(); expect(ret).assertTrue();
...@@ -418,7 +418,7 @@ describe('DeviceInfoTest', function () { ...@@ -418,7 +418,7 @@ describe('DeviceInfoTest', function () {
/** /**
* @tc.number SUB_STARTUP_JS_DEVCEINFO_0190 * @tc.number SUB_STARTUP_JS_DEVCEINFO_0190
* @tc.name testGetMajorVersion01 * @tc.name testGetMajorVersion01
* @tc.desc Get the major (M) version number, which increases with any updates to the overall architecture. * @tc.desc Get the major (M) version number which the return value is greater than 0.
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
...@@ -430,7 +430,7 @@ describe('DeviceInfoTest', function () { ...@@ -430,7 +430,7 @@ describe('DeviceInfoTest', function () {
console.info('the value of the deviceinfo majorVersion is :' + majorVersionInfo); console.info('the value of the deviceinfo majorVersion is :' + majorVersionInfo);
expect(majorVersionInfo).assertInstanceOf('Number'); expect(majorVersionInfo).assertInstanceOf('Number');
if(majorVersionInfo >= 0){ if (majorVersionInfo >= 0) {
ret = true; ret = true;
} }
expect(ret).assertTrue(); expect(ret).assertTrue();
...@@ -440,7 +440,7 @@ describe('DeviceInfoTest', function () { ...@@ -440,7 +440,7 @@ describe('DeviceInfoTest', function () {
/** /**
* @tc.number SUB_STARTUP_JS_DEVCEINFO_0210 * @tc.number SUB_STARTUP_JS_DEVCEINFO_0210
* @tc.name testGetSeniorVersion01 * @tc.name testGetSeniorVersion01
* @tc.desc Get the senior (S) version number, which increases with any updates to the partial. * @tc.desc Get the senior version number and the return value is greater than 0.
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
...@@ -452,7 +452,7 @@ describe('DeviceInfoTest', function () { ...@@ -452,7 +452,7 @@ describe('DeviceInfoTest', function () {
console.info('the value of the deviceinfo seniorVersion is :' + seniorVersionInfo); console.info('the value of the deviceinfo seniorVersion is :' + seniorVersionInfo);
expect(seniorVersionInfo).assertInstanceOf('Number'); expect(seniorVersionInfo).assertInstanceOf('Number');
if(seniorVersionInfo >= 0){ if (seniorVersionInfo >= 0) {
ret = true; ret = true;
} }
expect(ret).assertTrue(); expect(ret).assertTrue();
...@@ -462,7 +462,7 @@ describe('DeviceInfoTest', function () { ...@@ -462,7 +462,7 @@ describe('DeviceInfoTest', function () {
/** /**
* @tc.number SUB_STARTUP_JS_DEVCEINFO_0220 * @tc.number SUB_STARTUP_JS_DEVCEINFO_0220
* @tc.name testGetFeatureVersion01 * @tc.name testGetFeatureVersion01
* @tc.desc Get the feature (F) version number, which increases with any planned new features. * @tc.desc Get the feature (F) version number which the return value is greater than 0.
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
...@@ -474,7 +474,7 @@ describe('DeviceInfoTest', function () { ...@@ -474,7 +474,7 @@ describe('DeviceInfoTest', function () {
console.info('the value of the deviceinfo featureVersion is :' + featureVersionInfo); console.info('the value of the deviceinfo featureVersion is :' + featureVersionInfo);
expect(featureVersionInfo).assertInstanceOf('Number'); expect(featureVersionInfo).assertInstanceOf('Number');
if(featureVersionInfo >= 0){ if (featureVersionInfo >= 0) {
ret = true; ret = true;
} }
expect(ret).assertTrue(); expect(ret).assertTrue();
...@@ -484,7 +484,7 @@ describe('DeviceInfoTest', function () { ...@@ -484,7 +484,7 @@ describe('DeviceInfoTest', function () {
/** /**
* @tc.number SUB_STARTUP_JS_DEVCEINFO_0230 * @tc.number SUB_STARTUP_JS_DEVCEINFO_0230
* @tc.name testGetBuildVersion01 * @tc.name testGetBuildVersion01
* @tc.desc Get the build (B) version number, which increases with each new development build. * @tc.desc Get the build (B) version number which the return value is greater than 0.
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
...@@ -496,7 +496,7 @@ describe('DeviceInfoTest', function () { ...@@ -496,7 +496,7 @@ describe('DeviceInfoTest', function () {
console.info('the value of the deviceinfo buildVersion is :' + buildVersionInfo); console.info('the value of the deviceinfo buildVersion is :' + buildVersionInfo);
expect(buildVersionInfo).assertInstanceOf('Number'); expect(buildVersionInfo).assertInstanceOf('Number');
if(buildVersionInfo >= 0){ if (buildVersionInfo >= 0) {
ret = true; ret = true;
} }
expect(ret).assertTrue(); expect(ret).assertTrue();
...@@ -506,7 +506,7 @@ describe('DeviceInfoTest', function () { ...@@ -506,7 +506,7 @@ describe('DeviceInfoTest', function () {
/** /**
* @tc.number SUB_STARTUP_JS_DEVCEINFO_0240 * @tc.number SUB_STARTUP_JS_DEVCEINFO_0240
* @tc.name testGetSdkApiVersion01 * @tc.name testGetSdkApiVersion01
* @tc.desc Get the API version number. * @tc.desc Get the API version number, which return value type is number and return value is greater than 0.
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
...@@ -518,7 +518,7 @@ describe('DeviceInfoTest', function () { ...@@ -518,7 +518,7 @@ describe('DeviceInfoTest', function () {
console.info('the value of the deviceinfo sdkApiVersion is :' + sdkApiVersionInfo); console.info('the value of the deviceinfo sdkApiVersion is :' + sdkApiVersionInfo);
expect(sdkApiVersionInfo).assertInstanceOf('Number'); expect(sdkApiVersionInfo).assertInstanceOf('Number');
if(sdkApiVersionInfo >= 0){ if (sdkApiVersionInfo >= 0) {
ret = true; ret = true;
} }
expect(ret).assertTrue(); expect(ret).assertTrue();
...@@ -528,7 +528,7 @@ describe('DeviceInfoTest', function () { ...@@ -528,7 +528,7 @@ describe('DeviceInfoTest', function () {
/** /**
* @tc.number SUB_STARTUP_JS_DEVCEINFO_0250 * @tc.number SUB_STARTUP_JS_DEVCEINFO_0250
* @tc.name testGetFirstApiVersion01 * @tc.name testGetFirstApiVersion01
* @tc.desc Get the first API version number. * @tc.desc Get the first API version number which the return value is greater than 0.
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
...@@ -540,7 +540,7 @@ describe('DeviceInfoTest', function () { ...@@ -540,7 +540,7 @@ describe('DeviceInfoTest', function () {
console.info('the value of the deviceinfo firstApiVersion is :' + firstApiVersionInfo); console.info('the value of the deviceinfo firstApiVersion is :' + firstApiVersionInfo);
expect(firstApiVersionInfo).assertInstanceOf('Number'); expect(firstApiVersionInfo).assertInstanceOf('Number');
if(firstApiVersionInfo >= 0){ if (firstApiVersionInfo >= 0) {
ret = true; ret = true;
} }
expect(ret).assertTrue(); expect(ret).assertTrue();
...@@ -550,7 +550,7 @@ describe('DeviceInfoTest', function () { ...@@ -550,7 +550,7 @@ describe('DeviceInfoTest', function () {
/** /**
* @tc.number SUB_STARTUP_JS_DEVCEINFO_0260 * @tc.number SUB_STARTUP_JS_DEVCEINFO_0260
* @tc.name testGetVersionId01 * @tc.name testGetVersionId01
* @tc.desc Get the version ID number. * @tc.desc Get the version ID number by a string which the return value is not null.
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
...@@ -562,7 +562,7 @@ describe('DeviceInfoTest', function () { ...@@ -562,7 +562,7 @@ describe('DeviceInfoTest', function () {
console.info('the value of the deviceinfo versionId is :' + versionIdInfo); console.info('the value of the deviceinfo versionId is :' + versionIdInfo);
expect(versionIdInfo).assertInstanceOf('String'); expect(versionIdInfo).assertInstanceOf('String');
if(versionIdInfo !="" && versionIdInfo != null && versionIdInfo != undefined){ if (versionIdInfo != "" && versionIdInfo != null && versionIdInfo != undefined) {
ret = true; ret = true;
} }
expect(ret).assertTrue(); expect(ret).assertTrue();
...@@ -572,7 +572,7 @@ describe('DeviceInfoTest', function () { ...@@ -572,7 +572,7 @@ describe('DeviceInfoTest', function () {
/** /**
* @tc.number SUB_STARTUP_JS_DEVCEINFO_0270 * @tc.number SUB_STARTUP_JS_DEVCEINFO_0270
* @tc.name testGetBuildType01 * @tc.name testGetBuildType01
* @tc.desc Get the different build types of the same baseline code. * @tc.desc Get the different build types of the same baseline code which the return value is not null.
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
...@@ -584,7 +584,7 @@ describe('DeviceInfoTest', function () { ...@@ -584,7 +584,7 @@ describe('DeviceInfoTest', function () {
console.info('the value of the deviceinfo buildType is :' + buildTypeInfo); console.info('the value of the deviceinfo buildType is :' + buildTypeInfo);
expect(buildTypeInfo).assertInstanceOf('String'); expect(buildTypeInfo).assertInstanceOf('String');
if(buildTypeInfo !="" && buildTypeInfo != null && buildTypeInfo != undefined){ if (buildTypeInfo != "" && buildTypeInfo != null && buildTypeInfo != undefined) {
ret = true; ret = true;
} }
expect(ret).assertTrue(); expect(ret).assertTrue();
...@@ -594,7 +594,7 @@ describe('DeviceInfoTest', function () { ...@@ -594,7 +594,7 @@ describe('DeviceInfoTest', function () {
/** /**
* @tc.number SUB_STARTUP_JS_DEVCEINFO_0280 * @tc.number SUB_STARTUP_JS_DEVCEINFO_0280
* @tc.name testGetBuildUser01 * @tc.name testGetBuildUser01
* @tc.desc Get the different build user of the same baseline code. * @tc.desc Get the different build user by a string which the return value is not null.
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
...@@ -606,7 +606,7 @@ describe('DeviceInfoTest', function () { ...@@ -606,7 +606,7 @@ describe('DeviceInfoTest', function () {
console.info('the value of the deviceinfo buildUser is :' + buildUserInfo); console.info('the value of the deviceinfo buildUser is :' + buildUserInfo);
expect(buildUserInfo).assertInstanceOf('String'); expect(buildUserInfo).assertInstanceOf('String');
if(buildUserInfo !="" && buildUserInfo != null && buildUserInfo != undefined){ if (buildUserInfo != "" && buildUserInfo != null && buildUserInfo != undefined) {
ret = true; ret = true;
} }
expect(ret).assertTrue(); expect(ret).assertTrue();
...@@ -616,7 +616,7 @@ describe('DeviceInfoTest', function () { ...@@ -616,7 +616,7 @@ describe('DeviceInfoTest', function () {
/** /**
* @tc.number SUB_STARTUP_JS_DEVCEINFO_0290 * @tc.number SUB_STARTUP_JS_DEVCEINFO_0290
* @tc.name testGetBuildHost01 * @tc.name testGetBuildHost01
* @tc.desc Get the different build host of the same baseline code. * @tc.desc Get the build host of the same baseline code by a string and the return value is not null.
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
...@@ -628,7 +628,7 @@ describe('DeviceInfoTest', function () { ...@@ -628,7 +628,7 @@ describe('DeviceInfoTest', function () {
console.info('the value of the deviceinfo buildHost is :' + buildHostInfo); console.info('the value of the deviceinfo buildHost is :' + buildHostInfo);
expect(buildHostInfo).assertInstanceOf('String'); expect(buildHostInfo).assertInstanceOf('String');
if(buildHostInfo !="" && buildHostInfo != null && buildHostInfo != undefined){ if (buildHostInfo != "" && buildHostInfo != null && buildHostInfo != undefined) {
ret = true; ret = true;
} }
expect(ret).assertTrue(); expect(ret).assertTrue();
...@@ -638,7 +638,7 @@ describe('DeviceInfoTest', function () { ...@@ -638,7 +638,7 @@ describe('DeviceInfoTest', function () {
/** /**
* @tc.number SUB_STARTUP_JS_DEVCEINFO_0310 * @tc.number SUB_STARTUP_JS_DEVCEINFO_0310
* @tc.name testGetBuildTime01 * @tc.name testGetBuildTime01
* @tc.desc Get the the build time. * @tc.desc Get the version build time by a string and the return value is not null.
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
...@@ -650,7 +650,7 @@ describe('DeviceInfoTest', function () { ...@@ -650,7 +650,7 @@ describe('DeviceInfoTest', function () {
console.info('the value of the deviceinfo buildTime is :' + buildTimeInfo); console.info('the value of the deviceinfo buildTime is :' + buildTimeInfo);
expect(buildTimeInfo).assertInstanceOf('String'); expect(buildTimeInfo).assertInstanceOf('String');
if(buildTimeInfo !="" && buildTimeInfo != null && buildTimeInfo != undefined){ if (buildTimeInfo != "" && buildTimeInfo != null && buildTimeInfo != undefined) {
ret = true; ret = true;
} }
expect(ret).assertTrue(); expect(ret).assertTrue();
...@@ -660,7 +660,7 @@ describe('DeviceInfoTest', function () { ...@@ -660,7 +660,7 @@ describe('DeviceInfoTest', function () {
/** /**
* @tc.number SUB_STARTUP_JS_DEVCEINFO_0320 * @tc.number SUB_STARTUP_JS_DEVCEINFO_0320
* @tc.name testGetBuildRootHash01 * @tc.name testGetBuildRootHash01
* @tc.desc Get the version hash. * @tc.desc Get the version hash by a string and the return value is not null.
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
* @tc.level : Level 0 * @tc.level : Level 0
...@@ -672,7 +672,7 @@ describe('DeviceInfoTest', function () { ...@@ -672,7 +672,7 @@ describe('DeviceInfoTest', function () {
console.info('the value of the deviceinfo buildRootHash is :' + buildRootHashInfo); console.info('the value of the deviceinfo buildRootHash is :' + buildRootHashInfo);
expect(buildRootHashInfo).assertInstanceOf('String'); expect(buildRootHashInfo).assertInstanceOf('String');
if(buildRootHashInfo !="" && buildRootHashInfo != null && buildRootHashInfo != undefined){ if (buildRootHashInfo != "" && buildRootHashInfo != null && buildRootHashInfo != undefined) {
ret = true; ret = true;
} }
expect(ret).assertTrue(); expect(ret).assertTrue();
...@@ -720,7 +720,7 @@ describe('DeviceInfoTest', function () { ...@@ -720,7 +720,7 @@ describe('DeviceInfoTest', function () {
/** /**
* @tc.number SUB_STARTUP_JS_DEVCEINFO_0350 * @tc.number SUB_STARTUP_JS_DEVCEINFO_0350
* @tc.name testGetProductBrand02 * @tc.name testGetDeviceBrand02
* @tc.desc Get a string representing the external product family name which has a maximum of 32 characters. * @tc.desc Get a string representing the external product family name which has a maximum of 32 characters.
* @tc.size : MEDIUM * @tc.size : MEDIUM
* @tc.type : Function * @tc.type : Function
...@@ -1266,5 +1266,33 @@ describe('DeviceInfoTest', function () { ...@@ -1266,5 +1266,33 @@ describe('DeviceInfoTest', function () {
expect(len).assertLarger(MAX_CHARACTERS_NUM); expect(len).assertLarger(MAX_CHARACTERS_NUM);
console.info('device_info_test_060 :end'); console.info('device_info_test_060 :end');
}) })
/**
* @tc.number SUB_STARTUP_JS_DEVCEINFO_0670
* @tc.name testGetSecurityPatchTag02
* @tc.desc Get security pactch tag which format is yy--mm--dd test.
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('device_info_test_061', 0, function () {
console.info('testGetSecurityPatchTag02 start');
let ret = false;
let securityPatchTagInfo = deviceinfo.securityPatchTag;
console.info('the value of the deviceinfo securityPatchTag is :' + securityPatchTagInfo);
let reFormat = /^(\d{4})-(\d{2})-(\d{2})$/;
let re = securityPatchTagInfo.match(reFormat);
if (re != null){
ret = true;
expect(ret).assertTrue();
}else{
console.info('the return formate is not yy--mm--dd');
}
console.info('testGetSecurityPatchTag02 :end');
})
}) })
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册