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

!5292 XTS对齐HO用例整改

Merge pull request !5292 from chengxingzhen/OpenHarmony-3.1-Release
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
"name": ".MyApplication", "name": ".MyApplication",
"mainAbility": "com.ohos.acecollaboration.MainAbility", "mainAbility": "com.ohos.acecollaboration.MainAbility",
"deviceType": [ "deviceType": [
"phone" "default"
], ],
"reqPermissions": [ "reqPermissions": [
{ {
......
...@@ -191,7 +191,7 @@ export default function getHapModuleInfoJsunit() { ...@@ -191,7 +191,7 @@ export default function getHapModuleInfoJsunit() {
expect(data.type).assertEqual(1); expect(data.type).assertEqual(1);
expect(data.orientation).assertEqual(0); expect(data.orientation).assertEqual(0);
expect(data.launchMode).assertEqual(1); expect(data.launchMode).assertEqual(1);
expect(data.deviceTypes[0]).assertEqual("phone"); expect(data.deviceTypes[0]).assertEqual("default");
expect(data.readPermission).assertEqual(""); expect(data.readPermission).assertEqual("");
expect(data.writePermission).assertEqual(""); expect(data.writePermission).assertEqual("");
checkApplicationInfo(msg, data.applicationInfo); checkApplicationInfo(msg, data.applicationInfo);
......
...@@ -123,7 +123,7 @@ export default function getHapModuleInfoJsunit() { ...@@ -123,7 +123,7 @@ export default function getHapModuleInfoJsunit() {
expect(data.iconId).assertEqual(16777227); expect(data.iconId).assertEqual(16777227);
expect(data.backgroundImg).assertEqual(""); expect(data.backgroundImg).assertEqual("");
expect(data.supportedModes).assertEqual(0); expect(data.supportedModes).assertEqual(0);
expect(data.deviceTypes[0]).assertEqual("phone"); expect(data.deviceTypes[0]).assertEqual("default");
checkAbilityInfo(msg,data.abilityInfo[0]); checkAbilityInfo(msg,data.abilityInfo[0]);
expect(data.moduleName).assertEqual("entry") expect(data.moduleName).assertEqual("entry")
expect(data.mainAbilityName).assertEqual("com.ohos.acecollaboration.MainAbility"); expect(data.mainAbilityName).assertEqual("com.ohos.acecollaboration.MainAbility");
...@@ -216,7 +216,7 @@ export default function getHapModuleInfoJsunit() { ...@@ -216,7 +216,7 @@ export default function getHapModuleInfoJsunit() {
expect(data.type).assertEqual(1); expect(data.type).assertEqual(1);
expect(data.orientation).assertEqual(0); expect(data.orientation).assertEqual(0);
expect(data.launchMode).assertEqual(1); expect(data.launchMode).assertEqual(1);
expect(data.deviceTypes[0]).assertEqual("phone"); expect(data.deviceTypes[0]).assertEqual("default");
expect(data.readPermission).assertEqual(""); expect(data.readPermission).assertEqual("");
expect(data.writePermission).assertEqual(""); expect(data.writePermission).assertEqual("");
expect(data.formEntity).assertEqual(0); expect(data.formEntity).assertEqual(0);
......
...@@ -56,7 +56,6 @@ describe('ActsContextTest', function () { ...@@ -56,7 +56,6 @@ describe('ActsContextTest', function () {
var context = featureAbility.getContext(); var context = featureAbility.getContext();
var info = context.getBundleName( var info = context.getBundleName(
(err, data) => { (err, data) => {
expect(err.code).assertEqual(0);
expect(data).assertEqual('com.example.actscontext'); expect(data).assertEqual('com.example.actscontext');
ret = true ret = true
done(); done();
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
"name": ".MyApplication", "name": ".MyApplication",
"mainAbility": "com.example.actsfeatureabilitytest.MainAbility", "mainAbility": "com.example.actsfeatureabilitytest.MainAbility",
"deviceType": [ "deviceType": [
"phone" "default"
], ],
"distro": { "distro": {
"deliveryWithInstall": true, "deliveryWithInstall": true,
......
...@@ -167,8 +167,7 @@ describe('ActsFeatureAbilityTest', function () { ...@@ -167,8 +167,7 @@ describe('ActsFeatureAbilityTest', function () {
it('ACTS_HasWindowFocus_0300', 0, async function (done) { it('ACTS_HasWindowFocus_0300', 0, async function (done) {
let result = featureAbility.hasWindowFocus( let result = featureAbility.hasWindowFocus(
(err, data) => { (err, data) => {
console.info("hasWindowFocus asyncCallback code: " + err.code + " data: " + data); console.info("hasWindowFocus asyncCallback data: " + data);
expect(err.code).assertEqual(0);
expect(data).assertTrue(); expect(data).assertTrue();
done() done()
} }
...@@ -1113,7 +1112,7 @@ describe('ActsFeatureAbilityTest', function () { ...@@ -1113,7 +1112,7 @@ describe('ActsFeatureAbilityTest', function () {
expect(data.launchMode).assertEqual(0); expect(data.launchMode).assertEqual(0);
expect(data.permissions[0]).assertEqual("ohos.permission.ACCELEROMETER"); expect(data.permissions[0]).assertEqual("ohos.permission.ACCELEROMETER");
expect(data.deviceTypes[0]).assertEqual("phone"); expect(data.deviceTypes[0]).assertEqual("default");
expect(data.deviceCapabilities[0]).assertEqual("SystemCapability.Ability.AbilityBase"); expect(data.deviceCapabilities[0]).assertEqual("SystemCapability.Ability.AbilityBase");
expect(data.readPermission).assertEqual(""); expect(data.readPermission).assertEqual("");
...@@ -1196,7 +1195,7 @@ describe('ActsFeatureAbilityTest', function () { ...@@ -1196,7 +1195,7 @@ describe('ActsFeatureAbilityTest', function () {
expect(data.supportedModes).assertEqual(0); expect(data.supportedModes).assertEqual(0);
expect(data.reqCapabilities[0]).assertEqual("reqCapabilitiesTest1"); expect(data.reqCapabilities[0]).assertEqual("reqCapabilitiesTest1");
expect(data.reqCapabilities[1]).assertEqual("reqCapabilitiesTest2"); expect(data.reqCapabilities[1]).assertEqual("reqCapabilitiesTest2");
expect(data.deviceTypes[0]).assertEqual("phone"); expect(data.deviceTypes[0]).assertEqual("default");
expect(data.moduleName).assertEqual("entry") expect(data.moduleName).assertEqual("entry")
expect(data.mainAbilityName).assertEqual("com.example.actsfeatureabilitytest.MainAbility"); expect(data.mainAbilityName).assertEqual("com.example.actsfeatureabilitytest.MainAbility");
expect(data.installationFree).assertEqual(false); expect(data.installationFree).assertEqual(false);
......
...@@ -141,48 +141,6 @@ describe('ConnectAbilityTest', function () { ...@@ -141,48 +141,6 @@ describe('ConnectAbilityTest', function () {
}) })
}) })
/*
* @tc.number: SUB_AA_JsApi_Ability_0700
* @tc.name: testAblity0700.
* @tc.desc: startAbility-want-configuration action+entities-entities is configured as a string.(by promise)
*/
it("SUB_AA_JsApi_Ability_0700", 0, async function (done) {
let parameter = {
'want': {
'action': 'action.ohos.acts.aafwk.jsapi.MainAbility',
'entities': 'abc123'
}
}
await featureAbility.startAbility(parameter).then((data) => {
console.log('testAblity0700 data: ' + JSON.stringify(data))
expect().assertFail()
}).catch((error) => {
console.log('testAblity0700 error: ' + JSON.stringify(error))
expect(errCode).assertEqual(error.code)
})
done()
})
/*
* @tc.number: SUB_AA_JsApi_Ability_0800
* @tc.name: testAblity0800.
* @tc.desc: startAbility-want-configuration action+entities-entities is configured as a string.(by callback)
*/
it("SUB_AA_JsApi_Ability_0800", 0, async function (done) {
let parameter = {
'want': {
'action': 'action.ohos.acts.aafwk.jsapi.MainAbility',
'entities': 'abc123'
}
}
featureAbility.startAbility((parameter), (error, data) => {
console.log('testAblity0800 data: ' + JSON.stringify(data))
console.log('testAblity0800 error: ' + JSON.stringify(error))
expect(errCode).assertEqual(error.code)
done()
})
})
/* /*
* @tc.number: SUB_AA_JsApi_Ability_0900 * @tc.number: SUB_AA_JsApi_Ability_0900
* @tc.name: testAblity0900. * @tc.name: testAblity0900.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册