未验证 提交 4965e233 编写于 作者: O openharmony_ci 提交者: Gitee

!2402 wantConstant和crateFormBindingData新增用例

Merge pull request !2402 from chengxingzhen/master
......@@ -13,6 +13,7 @@
* limitations under the License.
*/
import formBindingData from "@ohos.application.formBindingData"
import formManager from '@ohos.ability.formManager'
import {describe, it, expect} from 'deccjsunit/index'
......@@ -87,4 +88,24 @@ describe('ActsFormsZeroTest', function () {
console.log("FMS_getFormsInfo_0300_promise end, ret:" + ret);
})
/**
* @tc.name CreateFormBindingData test
* @tc.number FMS_CreateFormBindingData_0100
* @tc.desc Creates data and returns a data object
*/
it('FMS_CreateFormBindingData_0100', 0, async function (done) {
console.log("FMS_CreateFormBindingData_0100 begin");
let dataObj = {
temperature:"22c",
"time":"22:00",
"test":22,
"test3":true
};
let obj = formBindingData.createFormBindingData(JSON.stringify(dataObj));
console.log('FMS_CreateFormBindingData_0100, obj.data:' + obj.data);
expect(JSON.stringify(dataObj)).assertEqual(obj.data);
done();
console.log("FMS_CreateFormBindingData_0100 end");
})
})
......@@ -1011,6 +1011,45 @@ describe('ActsGetWantTest', function () {
}
console.log('ACTS_GetWant_2000 end');
});
/**
* @tc.number: SUB_AA_OpenHarmony_wantConstantEnumeration_0100
* @tc.name: Check the enumerated value ACTION_IMAGE_CAPTURE of wantConstant.
* @tc.desc: Check the enumerated value ACTION_IMAGE_CAPTURE of wantConstant.
*/
it('SUB_AA_OpenHarmony_wantConstantEnumeration_0100',0, async function (done) {
console.log("SUB_AA_OpenHarmony_wantConstantEnumeration_0100 --- start")
let image = wantConstant.Action.ACTION_IMAGE_CAPTURE
expect(image).assertEqual("ohos.want.action.imageCapture")
console.log("SUB_AA_OpenHarmony_wantConstantEnumeration_0100 --- end")
done()
})
/**
* @tc.number: SUB_AA_OpenHarmony_wantConstantEnumeration_0200
* @tc.name: Check the enumerated value ACTION_VIDEO_CAPTURE of wantConstant.
* @tc.desc: Check the enumerated value ACTION_VIDEO_CAPTURE of wantCconstant.
*/
it('SUB_AA_OpenHarmony_wantConstantEnumeration_0200',0, async function (done) {
console.log("SUB_AA_OpenHarmony_wantConstantEnumeration_0200 --- start")
let video = wantConstant.Action.ACTION_VIDEO_CAPTURE
expect(video).assertEqual("ohos.want.action.videoCapture")
console.log("SUB_AA_OpenHarmony_wantConstantEnumeration_0200 --- end")
done()
})
/**
* @tc.number: SUB_AA_OpenHarmony_wantConstantEnumeration_0300
* @tc.name: Check the enumerated value ACTION_APP_ACCOUNT_OAUTH of wantConstant.
* @tc.desc: Check the enumerated value ACTION_APP_ACCOUNT_OAUTH of wantConstant.
*/
it('SUB_AA_OpenHarmony_wantConstantEnumeration_0300',0, async function (done) {
console.log("SUB_AA_OpenHarmony_wantConstantEnumeration_0300 --- start")
let app = wantConstant.ACTION_APP_ACCOUNT_OAUTH
expect(app).assertEqual("ohos.account.appAccount.action.oauth")
console.log("SUB_AA_OpenHarmony_wantConstantEnumeration_0300 --- end")
done()
})
function checkOnAbilityResult(data) {
console.info('====> ACTS_StartAbilityForResult_2000 start ability=====>' + JSON.stringify(data))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册