Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
cec90372
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
cec90372
编写于
7月 20, 2022
作者:
O
openharmony_ci
提交者:
Gitee
7月 20, 2022
浏览文件
操作
浏览文件
下载
差异文件
!4406 XTS失败用例适配
Merge pull request !4406 from chengxingzhen/master
上级
e6858aa7
c0f4ca1e
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
49 addition
and
22 deletion
+49
-22
ability/ability_runtime/fa/faapplicationinfo/entry/src/main/js/test/ApplicationInfoJsunit.test.js
...info/entry/src/main/js/test/ApplicationInfoJsunit.test.js
+21
-6
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formdeletetest/entry/src/main/ets/MainAbility/pages/index.ets
...deletetest/entry/src/main/ets/MainAbility/pages/index.ets
+1
-1
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formdeletetest/entry/src/main/ets/MainAbility/test/FmsDeleteForm.test.ets
...ntry/src/main/ets/MainAbility/test/FmsDeleteForm.test.ets
+0
-1
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandonetest/entry/src/main/ets/MainAbility/test/GetFormsInfo.test.ets
...entry/src/main/ets/MainAbility/test/GetFormsInfo.test.ets
+21
-11
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formreleasetest/entry/src/main/ets/MainAbility/test/FmsReleaseForm.test.ets
...try/src/main/ets/MainAbility/test/FmsReleaseForm.test.ets
+6
-3
未找到文件。
ability/ability_runtime/fa/faapplicationinfo/entry/src/main/js/test/ApplicationInfoJsunit.test.js
浏览文件 @
cec90372
...
...
@@ -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}
"
}));
done
();
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-------------
'
);
});
...
...
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formdeletetest/entry/src/main/ets/MainAbility/pages/index.ets
浏览文件 @
cec90372
...
...
@@ -40,7 +40,7 @@ struct Index {
core.init();
core.subscribeEvent('task', reportExtend);
const configService = core.getDefaultService('config');
want.parameters['timeout'] =
1
0000;
want.parameters['timeout'] =
2
0000;
console.info('[FormComponent] parameters---->' + JSON.stringify(want.parameters));
configService.setConfig(want.parameters);
testsuite();
...
...
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formdeletetest/entry/src/main/ets/MainAbility/test/FmsDeleteForm.test.ets
浏览文件 @
cec90372
...
...
@@ -599,7 +599,6 @@ export default function test() {
async
function
delPublishCallbackB
()
{
console
.
info
(
`${tcNumber} delPublishCallbackB`
);
await
sleep
(
1000
);
console
.
info
(
`${tcNumber} delPublishCallbackB end`
);
console
.
info
(
`${tcNumber} end`
);
done
();
...
...
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formgetformsinfotest/formsoneandonetest/entry/src/main/ets/MainAbility/test/GetFormsInfo.test.ets
浏览文件 @
cec90372
...
...
@@ -81,6 +81,7 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
console.log(`${callbackName} exception caught: ${JSON.stringify(error)})`);
console.log(`${callbackName} should not reach here`);
expect().assertFail();
done();
}
});
...
...
@@ -97,6 +98,7 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
console.log(`${promiseName} getFormsInfo data: ${JSON.stringify(data)}`);
console.log(`${promiseName} should not reach here`);
expect().assertFail();
done();
} catch (error) {
console.log(`${promiseName} exception caught: ${JSON.stringify(error)})`);
expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE);
...
...
@@ -177,7 +179,6 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
tempDataB = dataB[0]
expect(error.code).assertEqual(ERR_OK_CODE);
expect(error.message).assertEqual(ERR_OK);
done();
console.log(`==========${callbackName2} ${describeName} end==========`);
});
await sleep(2000)
...
...
@@ -232,9 +233,9 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
expect(FormInfo.FormType.JS).assertEqual(formInfo.type)
expect('card_b').assertEqual(formInfo.jsComponentName)
expect(FormInfo.ColorMode.MODE_AUTO).assertEqual(formInfo.colorMode)
expect(
1).assertEqual(formInfo.isDefault
)
expect(
1).assertEqual(formInfo.updateEnabled
)
expect(
1).assertEqual(formInfo.formVisibleNotify
)
expect(
formInfo.isDefault).assertTrue(
)
expect(
formInfo.updateEnabled).assertTrue(
)
expect(
formInfo.formVisibleNotify).assertTrue(
)
expect(undefined).assertEqual(formInfo.relatedBundleName)
expect("abilityb").assertEqual(formInfo.formConfigAbility)
expect(3).assertEqual(formInfo.updateDuration)
...
...
@@ -242,8 +243,8 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
expect('10:30').assertEqual(formInfo.scheduledUpdateTime)
expect(1).assertEqual(formInfo.supportDimensions[0])
expect(2).assertEqual(formInfo.supportDimensions[1])
expect('originWidgetNameB').assertEqual(formInfo.
metaData.
customizeData[0].name)
expect('valueB').assertEqual(formInfo.
metaData.
customizeData[0].value)
expect('originWidgetNameB').assertEqual(formInfo.customizeData[0].name)
expect('valueB').assertEqual(formInfo.customizeData[0].value)
}
/**
...
...
@@ -283,6 +284,7 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
console.log(`${promiseName3} getFormsInfo data: ${JSON.stringify(data)}`);
console.log(`${promiseName3} should not reach here`);
expect().assertFail();
done();
} catch (error) {
console.log(`${promiseName3} exception caught: ${JSON.stringify(error)})`);
expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE);
...
...
@@ -312,6 +314,7 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
console.log(`${callbackName4} exception caught: ${JSON.stringify(error)})`);
console.log(`${callbackName4} should not reach here`);
expect().assertFail();
done();
}
});
...
...
@@ -328,6 +331,7 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
console.log(`${promiseName4} getFormsInfo data: ${JSON.stringify(data)}`);
console.log(`${promiseName4} should not reach here`);
expect().assertFail();
done();
} catch (error) {
console.log(`${promiseName4} exception caught: ${JSON.stringify(error)})`);
expect(error.code).assertEqual(ERR_GET_BUNDLE_FAILED_CODE);
...
...
@@ -357,6 +361,7 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
console.log(`${callbackName5} exception caught: ${JSON.stringify(error)})`);
console.log(`${callbackName5} should not reach here`);
expect().assertFail();
done();
}
});
...
...
@@ -373,6 +378,7 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
console.log(`${promiseName5} getFormsInfo data: ${JSON.stringify(data)}`);
console.log(`${promiseName5} should not reach here`);
expect().assertFail();
done();
} catch (error) {
console.log(`${promiseName5} exception caught: ${JSON.stringify(error)})`);
expect(error.code).assertEqual(ERR_ADD_INVALID_PARAM_CODE);
...
...
@@ -403,6 +409,7 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
console.log(`${callbackName6} exception caught: ${JSON.stringify(error)})`);
console.log(`${callbackName6} should not reach here`);
expect().assertFail();
done();
}
});
...
...
@@ -424,6 +431,7 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
console.log(`${promiseName6} exception caught: ${JSON.stringify(error)})`);
console.log(`${promiseName6} should not reach here`);
expect().assertFail();
done();
}
});
...
...
@@ -460,6 +468,7 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
console.log(`${callbackName7} exception caught: ${JSON.stringify(error)})`);
console.log(`${callbackName7} should not reach here`);
expect().assertFail();
done();
}
});
...
...
@@ -492,6 +501,7 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
console.log(`${promiseName7} exception caught: ${JSON.stringify(error)})`);
console.log(`${promiseName7} should not reach here`);
expect().assertFail();
done();
}
});
...
...
@@ -504,17 +514,17 @@ export const getFormsInfoTest = (describeName, filterParameter) => {
expect(FormInfo.FormType.JS).assertEqual(formInfo.type)
expect('card_c').assertEqual(formInfo.jsComponentName)
expect(FormInfo.ColorMode.MODE_LIGHT).assertEqual(formInfo.colorMode)
expect(
1).assertEqual(formInfo.isDefault
)
expect(
1).assertEqual(formInfo.updateEnabled
)
expect(
1).assertEqual(formInfo.formVisibleNotify
)
expect(
formInfo.isDefault).assertTrue(
)
expect(
formInfo.updateEnabled).assertTrue(
)
expect(
formInfo.formVisibleNotify).assertTrue(
)
expect(undefined).assertEqual(formInfo.relatedBundleName)
expect("abilityc").assertEqual(formInfo.formConfigAbility)
expect(4).assertEqual(formInfo.updateDuration)
expect(3).assertEqual(formInfo.defaultDimension)
expect(3).assertEqual(formInfo.supportDimensions[0])
expect(4).assertEqual(formInfo.supportDimensions[1])
expect('originWidgetNameC').assertEqual(formInfo.
metaData.
customizeData[0].name)
expect('valueC').assertEqual(formInfo.
metaData.
customizeData[0].value)
expect('originWidgetNameC').assertEqual(formInfo.customizeData[0].name)
expect('valueC').assertEqual(formInfo.customizeData[0].value)
}
});
};
ability/ability_runtime/formmanager/fa/formsystemtest_ets/formreleasetest/entry/src/main/ets/MainAbility/test/FmsReleaseForm.test.ets
浏览文件 @
cec90372
...
...
@@ -31,7 +31,9 @@ var deleteForm_Event = "FMS_FormDelete_commonEvent";
var
subscriberOnAcquired
;
var
subscriberOnDeleted
;
var
subscriberOnReleased
;
function
sleep
(
time
)
{
return
new
Promise
((
resolve
)
=>
setTimeout
(
resolve
,
time
));
}
export
default
function
test
()
{
describe
(
`FmsReleaseFormTest`
,
()
=>
{
...
...
@@ -437,12 +439,12 @@ export default function test() {
}
}
}
function
releaseForms
()
{
async
function
releaseForms
()
{
console
.
debug
(
"====>FMS_releaseForm_1300 releaseForms====>"
);
commonEvent
.
subscribe
(
subscriberOnReleased
,
onReleasedCallBack
);
for
(
var
iIndex
=
0
;
iIndex
<
formIdList
.
length
;
iIndex
++
)
{
console
.
log
(
`FMS_releaseForm_1300 featureAbility.startAbility start`
);
featureAbility
.
startAbility
({
await
featureAbility
.
startAbility
({
want
:
{
bundleName
:
"com.ohos.st.formsystemhostc"
,
abilityName
:
"com.ohos.st.formsystemhostc.MainAbility"
,
...
...
@@ -465,6 +467,7 @@ export default function test() {
expect
()
.
assertFail
();
done
();
});
await
sleep
(
1000
)
console
.
log
(
`FMS_releaseForm_1300 featureAbility.startAbility end`
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录