提交 c0f4ca1e 编写于 作者: C chengxingzhen

XTS失败用例适配

Signed-off-by: Nchengxingzhen <chengxingzhen@huawei.com>
上级 40603dac
......@@ -27,7 +27,7 @@ var getCallingBundleType = {
}
describe('ApplicationInfoTest', function () {
var TAG = '';-
var TAG = '';
/*
* @tc.number SUB_AA_OpenHarmony_FormBase_1000
......@@ -44,11 +44,26 @@ describe('ApplicationInfoTest', function () {
"test":11,
"test3":true
}
var result = formBindingData.createFormBindingData(dataObj)
console.log(TAG + " result is : " + JSON.stringify(result))
expect(JSON.stringify(result)).
assertEqual(JSON.stringify({"data":"{\"temperature\":\"11c\",\"time\":\"11:00\",\"test\":11,\"test3\":true}"}));
var formData = formBindingData.createFormBindingData(dataObj)
console.info(TAG + " result is : " + JSON.stringify(formData))
let formDataStr = JSON.stringify(formData.data);
let formDataStrToObj = JSON.parse(formDataStr);
if (typeof(formDataStrToObj) == "string" ) {
console.info(TAG + " formDataStrToObj1 is : " + typeof formDataStrToObj)
let formDataStrToObj2 = JSON.parse(formDataStrToObj)
console.info(TAG + " formDataStrToObj2 is : " + typeof formDataStrToObj2)
expect(formDataStrToObj2.test).assertEqual(11)
expect(formDataStrToObj2.test3).assertTrue()
expect(formDataStrToObj2.time).assertEqual("11:00")
done();
} else {
console.info(TAG + " formDataStrToObj is : " + typeof formDataStrToObj)
expect(formDataStrToObj.test).assertEqual(11)
expect(formDataStrToObj.test3).assertTrue()
expect(formDataStrToObj.time).assertEqual("11:00")
done();
}
console.info('------------end SUB_AA_OpenHarmony_FormBase_1000-------------');
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册