Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
f52ad350
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
f52ad350
编写于
3月 15, 2022
作者:
O
openharmony_ci
提交者:
Gitee
3月 15, 2022
浏览文件
操作
浏览文件
下载
差异文件
!2428 【XTS】删除冗余XTS代码getAllFormInfo
Merge pull request !2428 from ry/cherry-pick-1647260414
上级
a5c20f20
f88d7535
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
0 addition
and
381 deletion
+0
-381
appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/entry/src/main/js/test/ActsBmsFormsInfoTest.test.js
...stest/entry/src/main/js/test/ActsBmsFormsInfoTest.test.js
+0
-381
未找到文件。
appexecfwk/bundle_standard/bundlemanager/actsbmsgetinfostest/entry/src/main/js/test/ActsBmsFormsInfoTest.test.js
浏览文件 @
f52ad350
...
...
@@ -27,44 +27,6 @@ const BUNDLE_NAME6 = "com.ohos.callui"
const
ABILITIY_NAME
=
"
com.ohos.callui.MainAbility
"
describe
(
'
ActsBmsFormsInfoTest
'
,
function
()
{
/**
* @tc.number: bms_getAllFormsInfo_0100
* @tc.name: getAllFormsInfo : get forms information for all apps
* @tc.desc: check forms information include system and vendor apps (by promise)
*/
it
(
'
bms_getAllFormsInfo_0100
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
=====================bms_getAllFormsInfo_0100==================
'
);
let
installer
=
await
bundle
.
getBundleInstaller
();
installer
.
install
([
'
/data/test/bmsThirdBundleTest1.hap
'
],
{
userId
:
100
,
installFlag
:
1
,
isKeepData
:
false
},
onReceiveinstallEvent
);
async
function
onReceiveinstallEvent
(
err
,
data
)
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
let
formsInfo
=
await
bundle
.
getAllFormsInfo
();
console
.
debug
(
'
======all form======
'
+
JSON
.
stringify
(
formsInfo
));
expect
(
formsInfo
.
length
).
assertEqual
(
4
);
checkFormIsExist
(
'
Form_JS1
'
,
formsInfo
,
'
1
'
);
checkFormIsExist
(
'
Form_JS1S
'
,
formsInfo
,
'
1S
'
,
true
);
checkFormIsExist
(
'
Form_JS1V
'
,
formsInfo
,
'
1V
'
,
false
,
true
);
checkFormIsExist
(
'
Form_JS1V2
'
,
formsInfo
,
'
1V2
'
);
installer
.
uninstall
(
BUNDLE_NAME1
,
{
userId
:
100
,
installFlag
:
1
,
isKeepData
:
false
},
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
done
();
});
}
})
function
checkSystemHapForm
(
dataInfo
)
{
console
.
debug
(
'
===system formInfo is
'
+
JSON
.
stringify
(
dataInfo
))
expect
(
dataInfo
.
name
).
assertEqual
(
'
Form_JS1S
'
);
...
...
@@ -117,349 +79,6 @@ describe('ActsBmsFormsInfoTest', function () {
expect
(
dataInfo
.
window
.
autoDesignWidth
).
assertEqual
(
true
);
}
/**
* @tc.number: bms_getAllFormsInfo_0200
* @tc.name: getAllFormsInfo : get forms information for all apps
* @tc.desc: check forms information include system and vendor apps (by callback)
*/
it
(
'
bms_getAllFormsInfo_0200
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
=====================bms_getAllFormsInfo_0200==================
'
);
let
installer
=
await
bundle
.
getBundleInstaller
();
installer
.
install
([
'
/data/test/bmsThirdBundleTest1.hap
'
],
{
userId
:
100
,
installFlag
:
1
,
isKeepData
:
false
},
onReceiveinstallEvent
);
function
onReceiveinstallEvent
(
err
,
data
)
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
bundle
.
getAllFormsInfo
((
err
,
formsInfo
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
formsInfo
.
length
).
assertLarger
(
0
);
checkFormIsExist
(
'
Form_JS1
'
,
formsInfo
,
'
1
'
);
checkFormIsExist
(
'
Form_JS1S
'
,
formsInfo
,
'
1S
'
,
true
);
checkFormIsExist
(
'
Form_JS1V
'
,
formsInfo
,
'
1V
'
,
false
,
true
);
checkFormIsExist
(
'
Form_JS1V2
'
,
formsInfo
,
'
1V2
'
);
installer
.
uninstall
(
BUNDLE_NAME1
,
{
userId
:
100
,
installFlag
:
1
,
isKeepData
:
false
},
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
done
();
});
});
}
})
/**
* @tc.number: bms_getAllFormsInfo_0300
* @tc.name: getAllFormsInfo : get forms information for all apps
* @tc.desc: check whether the form information of the update app is updated (by promise)
*/
it
(
'
bms_getAllFormsInfo_0300
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
=====================bms_getAllFormsInfo_0300==================
'
);
let
installer
=
await
bundle
.
getBundleInstaller
();
installer
.
install
([
'
/data/test/bmsThirdBundleTest1.hap
'
],
{
userId
:
100
,
installFlag
:
1
,
isKeepData
:
false
},
onReceiveinstallEvent
);
function
onReceiveinstallEvent
(
err
,
data
)
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
installer
.
install
([
'
/data/test/bmsThirdBundleTestA1.hap
'
],
{
userId
:
100
,
installFlag
:
1
,
isKeepData
:
false
},
async
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
var
formsInfo
=
await
bundle
.
getAllFormsInfo
();
expect
(
formsInfo
.
length
).
assertLarger
(
0
);
checkFormNoExist
(
formsInfo
,
'
Form_JS1
'
);
checkFormIsExist
(
'
Form_JSA1
'
,
formsInfo
,
'
A1
'
)
installer
.
uninstall
(
BUNDLE_NAME1
,
{
userId
:
100
,
installFlag
:
1
,
isKeepData
:
false
},
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
done
();
});
});
}
})
/**
* @tc.number: bms_getAllFormsInfo_0400
* @tc.name: getAllFormsInfo : get forms information for all apps
* @tc.desc: check whether the form information of the update app is updated (by callback)
*/
it
(
'
bms_getAllFormsInfo_0400
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
=====================bms_getAllFormsInfo_0400==================
'
);
let
installer
=
await
bundle
.
getBundleInstaller
();
installer
.
install
([
'
/data/test/bmsThirdBundleTest1.hap
'
],
{
userId
:
100
,
installFlag
:
1
,
isKeepData
:
false
},
onReceiveinstallEvent
);
function
onReceiveinstallEvent
(
err
,
data
)
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
installer
.
install
([
'
/data/test/bmsThirdBundleTestA1.hap
'
],
{
userId
:
100
,
installFlag
:
1
,
isKeepData
:
false
},
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
bundle
.
getAllFormsInfo
((
err
,
formsInfo
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
formsInfo
.
length
).
assertLarger
(
0
);
checkFormNoExist
(
formsInfo
,
'
Form_JS1
'
);
checkFormIsExist
(
'
Form_JSA1
'
,
formsInfo
,
'
A1
'
);
installer
.
uninstall
(
BUNDLE_NAME1
,
{
userId
:
100
,
installFlag
:
1
,
isKeepData
:
false
},
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
done
();
});
});
});
}
})
/**
* @tc.number: bms_getAllFormsInfo_0500
* @tc.name: getAllFormsInfo : get forms information for all apps
* @tc.desc: check whether the form information of the uninstall app is removed (by promise)
*/
it
(
'
bms_getAllFormsInfo_0500
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
=====================bms_getAllFormsInfo_0500==================
'
);
let
installer
=
await
bundle
.
getBundleInstaller
();
installer
.
install
([
'
/data/test/bmsThirdBundleTest1.hap
'
],
{
userId
:
100
,
installFlag
:
1
,
isKeepData
:
false
},
onReceiveinstallEvent
);
function
onReceiveinstallEvent
(
err
,
data
)
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
installer
.
uninstall
(
BUNDLE_NAME1
,
{
userId
:
100
,
installFlag
:
1
,
isKeepData
:
false
},
async
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
var
formsInfo
=
await
bundle
.
getAllFormsInfo
();
checkFormNoExist
(
formsInfo
,
'
Form_JS1
'
);
done
();
});
}
})
/**
* @tc.number: bms_getAllFormsInfo_0600
* @tc.name: getAllFormsInfo : get forms information for all apps
* @tc.desc: check whether the form information of the uninstall app is removed (by callback)
*/
it
(
'
bms_getAllFormsInfo_0600
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
=====================bms_getAllFormsInfo_0600==================
'
);
let
installer
=
await
bundle
.
getBundleInstaller
();
installer
.
install
([
'
/data/test/bmsThirdBundleTest1.hap
'
],
{
userId
:
100
,
installFlag
:
1
,
isKeepData
:
false
},
onReceiveinstallEvent
);
function
onReceiveinstallEvent
(
err
,
data
)
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
installer
.
uninstall
(
BUNDLE_NAME1
,
{
userId
:
100
,
installFlag
:
1
,
isKeepData
:
false
},
async
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
bundle
.
getAllFormsInfo
((
err
,
formsInfo
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
checkFormNoExist
(
formsInfo
,
'
Form_JS1
'
);
done
();
});
});
}
})
/**
* @tc.number: bms_getAllFormsInfo_0700
* @tc.name: getAllFormsInfo : get forms information for all apps
* @tc.desc: check form information of all apps which include one app have two forms (by promise)
*/
it
(
'
bms_getAllFormsInfo_0700
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
=====================bms_getAllFormsInfo_0700==================
'
);
let
installer
=
await
bundle
.
getBundleInstaller
();
installer
.
install
([
'
/data/test/bmsThirdBundleTest4.hap
'
],
{
userId
:
100
,
installFlag
:
1
,
isKeepData
:
false
},
onReceiveinstallEvent
);
async
function
onReceiveinstallEvent
(
err
,
data
)
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
var
formsInfo
=
await
bundle
.
getAllFormsInfo
();
expect
(
formsInfo
.
length
).
assertLarger
(
0
);
checkFormIsExist
(
'
Form_JS4A
'
,
formsInfo
,
'
4A
'
);
checkFormIsExist
(
'
Form_JS4B
'
,
formsInfo
,
'
4B
'
);
installer
.
uninstall
(
BUNDLE_NAME4
,
{
userId
:
100
,
installFlag
:
1
,
isKeepData
:
false
},
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
done
();
});
}
})
/**
* @tc.number: bms_getAllFormsInfo_0800
* @tc.name: getAllFormsInfo : get forms information for all apps
* @tc.desc: check form information of all apps which include one app have two forms (by callback)
*/
it
(
'
bms_getAllFormsInfo_0800
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
=====================bms_getAllFormsInfo_0800==================
'
);
let
installer
=
await
bundle
.
getBundleInstaller
();
installer
.
install
([
'
/data/test/bmsThirdBundleTest4.hap
'
],
{
userId
:
100
,
installFlag
:
1
,
isKeepData
:
false
},
onReceiveinstallEvent
);
async
function
onReceiveinstallEvent
(
err
,
data
)
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
bundle
.
getAllFormsInfo
((
err
,
formsInfo
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
formsInfo
.
length
).
assertLarger
(
0
);
checkFormIsExist
(
'
Form_JS4A
'
,
formsInfo
,
'
4A
'
);
checkFormIsExist
(
'
Form_JS4B
'
,
formsInfo
,
'
4B
'
);
installer
.
uninstall
(
BUNDLE_NAME4
,
{
userId
:
100
,
installFlag
:
1
,
isKeepData
:
false
},
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
done
();
});
});
}
})
/**
* @tc.number: bms_getAllFormsInfo_0900
* @tc.name: getAllFormsInfo : get forms information for all apps
* @tc.desc: check form information of all apps which include one app have two abilities,
* and each ability has forms (by promise)
*/
it
(
'
bms_getAllFormsInfo_0900
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
=====================bms_getAllFormsInfo_0900==================
'
);
let
installer
=
await
bundle
.
getBundleInstaller
();
installer
.
install
([
'
/data/test/bmsThirdBundleTest5.hap
'
],
{
userId
:
100
,
installFlag
:
1
,
isKeepData
:
false
},
onReceiveinstallEvent
);
async
function
onReceiveinstallEvent
(
err
,
data
)
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
var
formsInfo
=
await
bundle
.
getAllFormsInfo
();
expect
(
formsInfo
.
length
).
assertLarger
(
0
);
checkFormIsExist
(
'
Form_JS5A
'
,
formsInfo
,
'
5A
'
);
checkFormIsExist
(
'
Form_JS5B
'
,
formsInfo
,
'
5B
'
);
installer
.
uninstall
(
BUNDLE_NAME5
,
{
userId
:
100
,
installFlag
:
1
,
isKeepData
:
false
},
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
done
();
});
}
})
/**
* @tc.number: bms_getAllFormsInfo_1000
* @tc.name: getAllFormsInfo : get forms information for all apps
* @tc.desc: check form information of all apps which include one app have two abilities,
* and each ability has forms (by callback)
*/
it
(
'
bms_getAllFormsInfo_1000
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
=====================bms_getAllFormsInfo_1000==================
'
);
let
installer
=
await
bundle
.
getBundleInstaller
();
installer
.
install
([
'
/data/test/bmsThirdBundleTest5.hap
'
],
{
userId
:
100
,
installFlag
:
1
,
isKeepData
:
false
},
onReceiveinstallEvent
);
async
function
onReceiveinstallEvent
(
err
,
data
)
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
bundle
.
getAllFormsInfo
((
err
,
formsInfo
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
formsInfo
.
length
).
assertLarger
(
0
);
checkFormIsExist
(
'
Form_JS5A
'
,
formsInfo
,
'
5A
'
);
checkFormIsExist
(
'
Form_JS5B
'
,
formsInfo
,
'
5B
'
);
installer
.
uninstall
(
BUNDLE_NAME5
,
{
userId
:
100
,
installFlag
:
1
,
isKeepData
:
false
},
(
err
,
data
)
=>
{
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
status
).
assertEqual
(
0
);
expect
(
data
.
statusMessage
).
assertEqual
(
'
SUCCESS
'
);
done
();
});
});
}
})
/**
* @tc.number: bms_getFormsInfo_0100
* @tc.name: getFormsInfo : get forms information for one app
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录