提交 1d71d627 编写于 作者: N nan-xiansen 提交者: 南先森

fixed af565d71 from https://gitee.com/nan-xiansen/xts_acts/pulls/903

【startup_stanard】【master】fix docs issues.
Signed-off-by: Nnan-xiansen <nanjinbin@huawei.com>
Change-Id: I6d546777ebf287ddc5c4c3889b71bffd13fadd92
上级 43f477a7
...@@ -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 () {
...@@ -52,15 +52,15 @@ describe('DeviceInfoTest', function () { ...@@ -52,15 +52,15 @@ describe('DeviceInfoTest', function () {
*/ */
it('device_info_test_001', 0, function () { it('device_info_test_001', 0, function () {
console.info('device_info_test_001 start'); console.info('device_info_test_001 start');
let ret = false; let ret = false;
let deviceTypeInfo = deviceinfo.deviceType; let deviceTypeInfo = deviceinfo.deviceType;
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()
console.info('device_info_test_001 : end'); console.info('device_info_test_001 : end');
}) })
...@@ -74,329 +74,329 @@ describe('DeviceInfoTest', function () { ...@@ -74,329 +74,329 @@ describe('DeviceInfoTest', function () {
*/ */
it('device_info_test_002', 0, function () { it('device_info_test_002', 0, function () {
console.info('device_info_test_002 start'); console.info('device_info_test_002 start');
let ret = false; let ret = false;
let manufactureInfo = deviceinfo.manufacture; let manufactureInfo = deviceinfo.manufacture;
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();
console.info('device_info_test_002 :end'); console.info('device_info_test_002 :end');
}) })
/** /**
* @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
*/ */
it('device_info_test_004', 0, function () { it('device_info_test_004', 0, function () {
console.info('testGetMarketName01 start') console.info('testGetMarketName01 start')
let ret = false; let ret = false;
let marketNameInfo = deviceinfo.marketName; let marketNameInfo = deviceinfo.marketName;
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();
console.info('testGetMarketName01 :end'); console.info('testGetMarketName01 :end');
}) })
/** /**
* @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
*/ */
it('device_info_test_005', 0, function () { it('device_info_test_005', 0, function () {
console.info('testGetProductSeries01 start'); console.info('testGetProductSeries01 start');
let ret = false; let ret = false;
let productSeriesInfo = deviceinfo.productSeries; let productSeriesInfo = deviceinfo.productSeries;
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();
console.info('testGetProductSeries01 :end'); console.info('testGetProductSeries01 :end');
}) })
/** /**
* @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
*/ */
it('device_info_test_006', 0, function () { it('device_info_test_006', 0, function () {
console.info('testGetProductModel01 start'); console.info('testGetProductModel01 start');
let ret = false; let ret = false;
let productModelInfo = deviceinfo.productModel; let productModelInfo = deviceinfo.productModel;
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');
}) })
/** /**
* @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
*/ */
it('device_info_test_007', 0, function () { it('device_info_test_007', 0, function () {
console.info('testGetSoftwareModel01 start'); console.info('testGetSoftwareModel01 start');
let ret = false; let ret = false;
let softwareModelInfo = deviceinfo.softwareModel; let softwareModelInfo = deviceinfo.softwareModel;
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();
console.info('testGetSoftwareModel01 :end'); console.info('testGetSoftwareModel01 :end');
}) })
/** /**
* @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
*/ */
it('device_info_test_008', 0, function () { it('device_info_test_008', 0, function () {
console.info('testGetHardWareModel01 start'); console.info('testGetHardWareModel01 start');
let ret = false; let ret = false;
let hardwareModelInfo = deviceinfo.hardwareModel; let hardwareModelInfo = deviceinfo.hardwareModel;
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();
console.info('testGetHardWareModel01 :end'); console.info('testGetHardWareModel01 :end');
}) })
/** /**
* @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
*/ */
it('device_info_test_009', 0, function () { it('device_info_test_009', 0, function () {
console.info('testGetHardWareProfile01 start'); console.info('testGetHardWareProfile01 start');
let ret = false; let ret = false;
let hardwareProfileInfo = deviceinfo.hardwareProfile; let hardwareProfileInfo = deviceinfo.hardwareProfile;
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();
console.info('testGetHardWareProfile01 :end'); console.info('testGetHardWareProfile01 :end');
}) })
/** /**
* @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
*/ */
it('device_info_test_010', 0, function () { it('device_info_test_010', 0, function () {
console.info('testGetSerial01 start'); console.info('testGetSerial01 start');
let ret = false; let ret = false;
let serialInfo = deviceinfo.serial; let serialInfo = deviceinfo.serial;
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();
console.info('testGetSerial01 :end'); console.info('testGetSerial01 :end');
}) })
/** /**
* @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
*/ */
it('device_info_test_011', 0, function () { it('device_info_test_011', 0, function () {
console.info('testGetBootLoaderVersion01 start'); console.info('testGetBootLoaderVersion01 start');
let ret = false; let ret = false;
let bootloaderVersionInfo = deviceinfo.bootloaderVersion; let bootloaderVersionInfo = deviceinfo.bootloaderVersion;
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();
console.info('testGetBootLoaderVersion01 :end') console.info('testGetBootLoaderVersion01 :end')
}) })
/** /**
* @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
*/ */
it('device_info_test_012', 0, function () { it('device_info_test_012', 0, function () {
console.info('testGetabiList01 start'); console.info('testGetabiList01 start');
let ret = false; let ret = false;
let abiListInfo = deviceinfo.abiList; let abiListInfo = deviceinfo.abiList;
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();
console.info('testGetabiList01 :end'); console.info('testGetabiList01 :end');
}) })
/** /**
* @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
*/ */
it('device_info_test_013', 0, function () { it('device_info_test_013', 0, function () {
console.info('testGetSecurityPatchTag01 start'); console.info('testGetSecurityPatchTag01 start');
let ret = false; let ret = false;
let securityPatchTagInfo = deviceinfo.securityPatchTag; let securityPatchTagInfo = deviceinfo.securityPatchTag;
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();
console.info('testGetSecurityPatchTag01 :end'); console.info('testGetSecurityPatchTag01 :end');
}) })
/** /**
* @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
*/ */
it('device_info_test_014', 0, function () { it('device_info_test_014', 0, function () {
console.info('testGetDisplayVersion01 start'); console.info('testGetDisplayVersion01 start');
let ret = false; let ret = false;
let displayVersionInfo = deviceinfo.displayVersion; let displayVersionInfo = deviceinfo.displayVersion;
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();
console.info('testGetDisplayVersion01 :end'); console.info('testGetDisplayVersion01 :end');
}) })
/** /**
* @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
*/ */
it('device_info_test_015', 0, function () { it('device_info_test_015', 0, function () {
console.info('testGetIncrementalVersion01 start'); console.info('testGetIncrementalVersion01 start');
let ret = false; let ret = false;
let incrementalVersionInfo = deviceinfo.incrementalVersion; let incrementalVersionInfo = deviceinfo.incrementalVersion;
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();
console.info('testGetIncrementalVersion01 :end'); console.info('testGetIncrementalVersion01 :end');
}) })
/** /**
* @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
*/ */
it('device_info_test_016', 0, function () { it('device_info_test_016', 0, function () {
console.info('testGetOSReleaserType01 start'); console.info('testGetOSReleaserType01 start');
let ret = false; let ret = false;
let osReleaseTypeInfo = deviceinfo.osReleaseType; let osReleaseTypeInfo = deviceinfo.osReleaseType;
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();
console.info('testGetOSReleaserType01 :end'); console.info('testGetOSReleaserType01 :end');
}) })
/** /**
* @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,274 +408,274 @@ describe('DeviceInfoTest', function () { ...@@ -408,274 +408,274 @@ 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();
console.info('testGetOSFullName01 :end'); console.info('testGetOSFullName01 :end');
}) })
/** /**
* @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
*/ */
it('device_info_test_018', 0, function () { it('device_info_test_018', 0, function () {
console.info('testGetMajorVersion01 start'); console.info('testGetMajorVersion01 start');
let ret = false; let ret = false;
let majorVersionInfo = deviceinfo.majorVersion; let majorVersionInfo = deviceinfo.majorVersion;
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();
console.info('testGetMajorVersion01 :end'); console.info('testGetMajorVersion01 :end');
}) })
/** /**
* @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
*/ */
it('device_info_test_019', 0, function () { it('device_info_test_019', 0, function () {
console.info('testGetSeniorVersion01 start'); console.info('testGetSeniorVersion01 start');
let ret = false; let ret = false;
let seniorVersionInfo = deviceinfo.seniorVersion; let seniorVersionInfo = deviceinfo.seniorVersion;
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();
console.info('testGetSeniorVersion01 :end'); console.info('testGetSeniorVersion01 :end');
}) })
/** /**
* @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
*/ */
it('device_info_test_020', 0, function () { it('device_info_test_020', 0, function () {
console.info('testGetFeatureVersion01 start'); console.info('testGetFeatureVersion01 start');
let ret = false; let ret = false;
let featureVersionInfo = deviceinfo.featureVersion; let featureVersionInfo = deviceinfo.featureVersion;
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();
console.info('testGetFeatureVersion01 :end'); console.info('testGetFeatureVersion01 :end');
}) })
/** /**
* @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
*/ */
it('device_info_test_021', 0, function () { it('device_info_test_021', 0, function () {
console.info('testGetBuildVersion01 start'); console.info('testGetBuildVersion01 start');
let ret = false; let ret = false;
let buildVersionInfo = deviceinfo.buildVersion; let buildVersionInfo = deviceinfo.buildVersion;
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();
console.info('testGetBuildVersion01 :end'); console.info('testGetBuildVersion01 :end');
}) })
/** /**
* @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
*/ */
it('device_info_test_022', 0, function () { it('device_info_test_022', 0, function () {
console.info('testGetSdkApiVersion01 start'); console.info('testGetSdkApiVersion01 start');
let ret = false; let ret = false;
let sdkApiVersionInfo = deviceinfo.sdkApiVersion; let sdkApiVersionInfo = deviceinfo.sdkApiVersion;
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();
console.info('testGetSdkApiVersion01 :end'); console.info('testGetSdkApiVersion01 :end');
}) })
/** /**
* @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
*/ */
it('device_info_test_023', 0, function () { it('device_info_test_023', 0, function () {
console.info('testGetFirstApiVersion01 start'); console.info('testGetFirstApiVersion01 start');
let ret = true; let ret = true;
let firstApiVersionInfo = deviceinfo.firstApiVersion; let firstApiVersionInfo = deviceinfo.firstApiVersion;
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();
console.info('testGetFirstApiVersion01 :end'); console.info('testGetFirstApiVersion01 :end');
}) })
/** /**
* @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
*/ */
it('device_info_test_024', 0, function () { it('device_info_test_024', 0, function () {
console.info('testGetVersionId01 start'); console.info('testGetVersionId01 start');
let ret = false; let ret = false;
let versionIdInfo = deviceinfo.versionId; let versionIdInfo = deviceinfo.versionId;
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();
console.info('testGetVersionId01 :end'); console.info('testGetVersionId01 :end');
}) })
/** /**
* @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
*/ */
it('device_info_test_025', 0, function () { it('device_info_test_025', 0, function () {
console.info('testGetBuildType01 start'); console.info('testGetBuildType01 start');
let ret = false; let ret = false;
let buildTypeInfo = deviceinfo.buildType; let buildTypeInfo = deviceinfo.buildType;
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();
console.info('testGetBuildType01 :end'); console.info('testGetBuildType01 :end');
}) })
/** /**
* @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
*/ */
it('device_info_test_026', 0, function () { it('device_info_test_026', 0, function () {
console.info('testGetBuildUser01 start'); console.info('testGetBuildUser01 start');
let ret = true; let ret = true;
let buildUserInfo = deviceinfo.buildUser; let buildUserInfo = deviceinfo.buildUser;
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();
console.info('testGetBuildUser01 :end'); console.info('testGetBuildUser01 :end');
}) })
/** /**
* @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
*/ */
it('device_info_test_027', 0, function () { it('device_info_test_027', 0, function () {
console.info('testGetBuildHost01 start'); console.info('testGetBuildHost01 start');
let ret = false; let ret = false;
let buildHostInfo = deviceinfo.buildHost; let buildHostInfo = deviceinfo.buildHost;
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();
console.info('testGetBuildHost01 :end'); console.info('testGetBuildHost01 :end');
}) })
/** /**
* @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
*/ */
it('device_info_test_028', 0, function () { it('device_info_test_028', 0, function () {
console.info('testGetBuildTime01 start'); console.info('testGetBuildTime01 start');
let ret = false; let ret = false;
let buildTimeInfo = deviceinfo.buildTime; let buildTimeInfo = deviceinfo.buildTime;
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();
console.info('testGetBuildTime01 :end'); console.info('testGetBuildTime01 :end');
}) })
/** /**
* @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
*/ */
it('device_info_test_029', 0, function () { it('device_info_test_029', 0, function () {
console.info('testGetBuildRootHash01 start'); console.info('testGetBuildRootHash01 start');
let ret = false; let ret = false;
let buildRootHashInfo = deviceinfo.buildRootHash; let buildRootHashInfo = deviceinfo.buildRootHash;
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();
console.info('testGetBuildRootHash01 :end'); console.info('testGetBuildRootHash01 :end');
}) })
...@@ -693,7 +693,7 @@ describe('DeviceInfoTest', function () { ...@@ -693,7 +693,7 @@ describe('DeviceInfoTest', function () {
console.info('the value of the deviceinfo deviceType is:' + deviceTypeInfo); console.info('the value of the deviceinfo deviceType is:' + deviceTypeInfo);
let len = deviceTypeInfo.length let len = deviceTypeInfo.length
console.info('the value of the device type characters:' + len); console.info('the value of the device type characters:' + len);
expect(len).assertLess(MAX_CHARACTERS_NUM_ONE) expect(len).assertLess(MAX_CHARACTERS_NUM_ONE)
console.info('device_info_test_030 :end') console.info('device_info_test_030 :end')
...@@ -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.
先完成此消息的编辑!
想要评论请 注册