未验证 提交 30e837b3 编写于 作者: O openharmony_ci 提交者: Gitee

!3463 [startup_standard][master]modify systemdeviceapi testDeviceProduct01

Merge pull request !3463 from leiyuqian/cherry-pick-1654600945
...@@ -37,7 +37,7 @@ describe('SystemDeviceTest', function () { ...@@ -37,7 +37,7 @@ describe('SystemDeviceTest', function () {
console.info('beforeAll: Prerequisites at the test suite level, \ console.info('beforeAll: Prerequisites at the test suite level, \
which are executed before the test suite is executed.'); which are executed before the test suite is executed.');
device.getInfo({ device.getInfo({
success: function(data){ success: function (data) {
console.log('getInfo success:' + JSON.stringify(data)); console.log('getInfo success:' + JSON.stringify(data));
brandInfo = data.brand; brandInfo = data.brand;
manufactureInfo = data.manufacturer; manufactureInfo = data.manufacturer;
...@@ -53,7 +53,7 @@ describe('SystemDeviceTest', function () { ...@@ -53,7 +53,7 @@ describe('SystemDeviceTest', function () {
screenShapeInfo = data.screenShape; screenShapeInfo = data.screenShape;
}, },
fail: function(data, code){ fail: function (data, code) {
console.log('getInfo failed.Error code:' + code + ';Error information: ' + JSON.stringify(data)); console.log('getInfo failed.Error code:' + code + ';Error information: ' + JSON.stringify(data));
brandInfo = data.brand; brandInfo = data.brand;
manufactureInfo = data.manufacturer; manufactureInfo = data.manufacturer;
...@@ -68,7 +68,7 @@ describe('SystemDeviceTest', function () { ...@@ -68,7 +68,7 @@ describe('SystemDeviceTest', function () {
screenDensityInfo = data.screenDensity; screenDensityInfo = data.screenDensity;
screenShapeInfo = data.screenShape; screenShapeInfo = data.screenShape;
}, },
complete: function(){ complete: function () {
console.log('getInfo complete'); console.log('getInfo complete');
} }
}); });
...@@ -177,12 +177,6 @@ describe('SystemDeviceTest', function () { ...@@ -177,12 +177,6 @@ describe('SystemDeviceTest', function () {
ret = true; ret = true;
} }
expect(ret).assertTrue(); expect(ret).assertTrue();
let str = /^[A-Za-z]+[ ][\d](.[\d])[ ][A-Za-z]+$/g;
let arr = deviceProductInfo.match(str);
let bufferstr = arr.join('');
console.info('the value of the bufferstr is :' + bufferstr);
expect(deviceProductInfo).assertEqual(bufferstr);
console.info('testDeviceProduct01 :end'); console.info('testDeviceProduct01 :end');
}) })
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册