提交 470eed18 编写于 作者: X xinxin13

fix formswithoutpermtest

Signed-off-by: Nxinxin13 <xinxin13@huawei.com>
上级 f24e2d8b
...@@ -102,6 +102,10 @@ ...@@ -102,6 +102,10 @@
{ {
"name": "ohos.permission.CLEAN_BACKGROUND_PROCESSES", "name": "ohos.permission.CLEAN_BACKGROUND_PROCESSES",
"reason": "need use ohos.permission.CLEAN_BACKGROUND_PROCESSES" "reason": "need use ohos.permission.CLEAN_BACKGROUND_PROCESSES"
},
{
"name": "ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason": "need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
} }
], ],
"js": [ "js": [
......
...@@ -35,7 +35,7 @@ export const getAllFormsInfoTest = (describeName, filterParameter) => { ...@@ -35,7 +35,7 @@ export const getAllFormsInfoTest = (describeName, filterParameter) => {
try { try {
formHost.getAllFormsInfo((error, data) => { formHost.getAllFormsInfo((error, data) => {
console.log(`${callbackName} getAllFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`); console.log(`${callbackName} getAllFormsInfo data: ${JSON.stringify(data)} error: ${JSON.stringify(error)}`);
expect(JSON.stringify(data)).assertEqual(`[]`); expect(Array.isArray(data)).assertEqual(true);
expect(error.code).assertEqual(ERR_OK_CODE); expect(error.code).assertEqual(ERR_OK_CODE);
done(); done();
console.log(`==========${callbackName} ${describeName} end==========`); console.log(`==========${callbackName} ${describeName} end==========`);
...@@ -58,7 +58,7 @@ export const getAllFormsInfoTest = (describeName, filterParameter) => { ...@@ -58,7 +58,7 @@ export const getAllFormsInfoTest = (describeName, filterParameter) => {
try { try {
const data = await formHost.getAllFormsInfo(); const data = await formHost.getAllFormsInfo();
console.log(`${promiseName} getAllFormsInfo data: ${JSON.stringify(data)}`); console.log(`${promiseName} getAllFormsInfo data: ${JSON.stringify(data)}`);
expect(JSON.stringify(data)).assertEqual(`[]`); expect(Array.isArray(data)).assertEqual(true);
done(); done();
console.log(`==========${promiseName} ${describeName} end==========`); console.log(`==========${promiseName} ${describeName} end==========`);
} catch (error) { } catch (error) {
......
...@@ -17,8 +17,8 @@ import formHost from '@ohos.application.formHost'; ...@@ -17,8 +17,8 @@ import formHost from '@ohos.application.formHost';
import { describe, expect, it } from '@ohos/hypium' import { describe, expect, it } from '@ohos/hypium'
export const getFormsInfoTest = (describeName, filterParameter) => { export const getFormsInfoTest = (describeName, filterParameter) => {
const ERR_PERMISSION_DENY_CODE = 2; const ERR_PERMISSION_DENY_CODE = 5;
const ERR_PERMISSION_DENY = `does not have permission to use forms`; const ERR_PERMISSION_DENY = `failed to obtain the bundle information`;
describe(`${describeName}`, () => { describe(`${describeName}`, () => {
const callbackName = `FMS_getFormsInfo_Callback_0800`; const callbackName = `FMS_getFormsInfo_Callback_0800`;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册