提交 973dc775 编写于 作者: K kirl.liu

CoverageRate Info

Signed-off-by: Nkirl.liu <kirl.liu@huawei.com>
上级 b5da3779
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("ActsAbilityLifecycleStateNewTest") {
hap_profile = "./entry/src/main/config.json"
deps = [
":hjs_demo_js_assets",
":hjs_demo_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsAbilityLifecycleStateNewTest"
}
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/js/default"
}
ohos_resources("hjs_demo_resources") {
sources = [ "./entry/src/main/js/resources" ]
hap_profile = "./entry/src/main/config.json"
}
{
"description": "Configuration for hjunit demo Tests",
"driver": {
"type": "JSUnitTest",
"test-timeout": "60000",
"package": "com.amsst.actsabilitylifecyclestatenewtest",
"shell-timeout": "60000"
},
"kits": [
{
"test-file-name": [
"ActsAbilityLifecycleStateNewTest.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
}
]
}
{
"app": {
"bundleName": "com.amsst.actsabilitylifecyclestatenewtest",
"vendor": "amsst",
"version": {
"code": 1,
"name": "1.0"
},
"apiVersion": {
"compatible": 4,
"target": 5,
"releaseType": "Beta1"
}
},
"deviceConfig": {},
"module": {
"package": "com.amsst.actsabilitylifecyclestatenewtest",
"name": ".MyApplication",
"deviceType": [
"phone"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "entry",
"moduleType": "entry"
},
"abilities": [
{
"skills": [
{
"entities": [
"entity.system.home"
],
"actions": [
"action.system.home"
]
}
],
"name": "com.amsst.actsabilitylifecyclestatenewtest.MainAbility",
"icon": "$media:icon",
"description": "$string:mainability_description",
"label": "$string:app_name",
"type": "page",
"launchType": "standard",
"visible": true
}
],
"reqPermissions": [
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.INSTALL_BUNDLE"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO",
"reason":"need use ohos.permission.GET_BUNDLE_INFO"
},
{
"name":"ohos.permission.GET_BUNDLE_INFO_PRIVILEGED",
"reason":"need use ohos.permission.GET_BUNDLE_INFO_PRIVILEGED"
},
{
"name":"ohos.permission.CHANGE_ABILITY_ENABLED_STATE",
"reason":"need use ohos.permission.CHANGE_ABILITY_ENABLED_STATE"
},
{
"name":"ohos.permission.REMOVE_CACHE_FILES",
"reason":"need use ohos.permission.REMOVE_CACHE_FILES"
},
{
"name":"ohos.permission.LISTEN_BUNDLE_CHANGE",
"reason":"need use ohos.permission.LISTEN_BUNDLE_CHANGE"
},
{
"name":"ohos.permission.MANAGE_LOCAL_ACCOUNTS",
"reason":"need use ohos.permission.MANAGE_LOCAL_ACCOUNTS"
}
],
"js": [
{
"pages": [
"pages/index/index"
],
"name": "default",
"window": {
"designWidth": 720,
"autoDesignWidth": false
}
}
]
}
}
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Copyright (C) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......@@ -27,49 +27,49 @@ var valueBucket = {
}
beforeAll(async (done) => {
console.debug('= ACTS_beforeAll 1425 ====<begin');
console.debug('= ACTS_AbeforeAll 1425 ====<begin');
try {
DAHelper = featureAbility.acquireDataAbilityHelper(dataAbilityUri);
console.debug('ACTS_beforeAll DAHelper ====>: ' + DAHelper + " ,JSON. " + JSON.stringify(DAHelper));
console.debug('ACTS_AbeforeAll DAHelper ====>: ' + DAHelper + " ,JSON. " + JSON.stringify(DAHelper));
if(DAHelper == null){
console.debug('ACTS_beforeAll DAHelper ====>: DAHelper == null');
console.debug('ACTS_AbeforeAll DAHelper ====>: DAHelper == null');
}
} catch (err) {
console.error('=ACTS_beforeAll acquireDataAbilityHelper catch(err)====>:' + err);
console.error('=ACTS_AbeforeAll acquireDataAbilityHelper catch(err)====>:' + err);
}
console.debug('= ACTS_beforeAll ====<end');
console.debug('= ACTS_AbeforeAll ====<end');
done();
})
beforeEach(async (done) => {
console.debug('= ACTS_beforeEach ====<begin');
console.debug('= ACTS_AbeforeEach ====<begin');
setTimeout(function () {
console.debug('= ACTS_beforeEach ====<end');
console.debug('= ACTS_AbeforeEach ====<end');
done();
}, gSetTimeout);
})
afterEach(async (done) => {
console.debug('= ACTS_afterEach ====<begin');
console.debug('= ACTS_AafterEach ====<begin');
setTimeout(function () {
console.debug('= ACTS_afterEach ====<end');
console.debug('= ACTS_AafterEach ====<end');
done();
}, gSetTimeout);
})
afterAll((done) => {
console.debug('= ACTS_afterAll ====<begin');
console.debug('= ACTS_AafterAll ====<begin');
setTimeout(function () {
console.debug('= ACTS_afterAll ====<end');
console.debug('= ACTS_AafterAll ====<end');
featureAbility.terminateSelf();
done();
}, gSetTimeout);
})
/*
* @tc.number: ACTS_featureAbilityEnum_0100
* @tc.number: ACTS_AfeatureAbilityEnum_0100
* @tc.name: Enum the client resource of the Data ability.
* @tc.desc: Check the return value of the interface (by AsyncCallback)
*/
it('ACTS_featureAbilityEnum_0100', 0, async function (done) {
console.log('ACTS_featureAbilityEnum_0100====<begin');
it('ACTS_AfeatureAbilityEnum_0100', 0, async function (done) {
console.log('ACTS_AfeatureAbilityEnum_0100====<begin');
try {
expect(featureAbility.ContinuationState.LOCAL_RUNNING).assertEqual(0);
expect(featureAbility.ContinuationState.REMOTE_RUNNING).assertEqual(1);
......@@ -79,47 +79,59 @@ it('ACTS_featureAbilityEnum_0100', 0, async function (done) {
expect(abilityManager.ProcessErrCode.CRASHED).assertEqual(1);
expect(abilityManager.ProcessErrCode.NO_RESPONSE).assertEqual(2);
console.log('ACTS_featureAbilityEnum_0100====<end');
console.log('ACTS_AfeatureAbilityEnum_0100====<end');
done();
} catch (err) {
console.log('ACTS_featureAbilityEnum_0100====<end catch(err)=' + err);
console.log('ACTS_AfeatureAbilityEnum_0100====<end catch(err)=' + err);
done();
}
})
/*
* @tc.number: ACTS_Insert_0400
* @tc.number: ACTS_AInsert_0800
* @tc.name: Insert : Indicates the path of the data to operate
* @tc.desc: Check the return value of the interface (by AsyncCallback)
*/
it('ACTS_Insert_0400', 0, async function (done) {
console.log('ACTS_Insert_0400====<begin');
it('ACTS_AInsert_0800', 0, async function (done) {
console.log('ACTS_AInsert_0800====<begin');
console.log('featureAbility getDataAbilityHelper ====>: ' + DAHelper)
var currentAlertTimeout;
try {
function onAsyncCallbackInsert0800(err) {
clearTimeout(currentAlertTimeout);
expect(err.code).assertEqual(0);
console.log('ACTS_AInsert_0800====<onAsyncCallbackInsert0800');
DAHelper.off("dataChange", dataAbilityUri, onAsyncCallbackInsert0800);
done();
}
DAHelper.on("dataChange", dataAbilityUri, onAsyncCallbackInsert0800);
await DAHelper.insert(dataAbilityUri, valueBucket,
(err, data) => {
console.debug("=ACTS_Insert_0400 err,data=======>"
console.debug("=ACTS_AInsert_0800 err,data=======>"
+ ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
expect(data).assertEqual(1);
console.log('ACTS_Insert_0400====<end');
var mSetTimeout = 1000
currentAlertTimeout = setTimeout(mySetTimeout, mSetTimeout);
function mySetTimeout() {
console.debug('ACTS_AInsert_0800====< mySetTimeout');
done();
}
}
);
} catch (err) {
console.error('=ACTS_Insert_0400 catch(err)====>:' + err);
console.log('ACTS_Insert_0400====<end catch');
console.error('=ACTS_AInsert_0800 catch(err)====>:' + err);
console.log('ACTS_AInsert_0800====<end catch');
done();
}
})
/*
* @tc.number: ACTS_BatchInsert_0600
* @tc.number: ACTS_ABatchInsert_0600
* @tc.name: Inserts multiple data records into the database
* @tc.desc: Check the return value of the interface (by AsyncCallback)
*/
it('ACTS_BatchInsert_0600', 0, async function (done) {
console.log('ACTS_BatchInsert_0600====<begin');
it('ACTS_ABatchInsert_0600', 0, async function (done) {
console.log('ACTS_ABatchInsert_0600====<begin');
console.log('featureAbility BatchInsert getDataAbilityHelper ====>: ' + DAHelper)
var valueBucketArray = new Array({ "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, },
{ "name": "ActsDataAbilityHelperTest", "age": 24, "salary": 2024.20, },
......@@ -129,27 +141,27 @@ it('ACTS_BatchInsert_0600', 0, async function (done) {
dataAbilityUri,
valueBucketArray,
(err, data) => {
console.debug("=ACTS_BatchInsert_0600 err,data=======>"
console.debug("=ACTS_ABatchInsert_0600 err,data=======>"
+ ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
expect(data).assertEqual(3);
console.log('ACTS_BatchInsert_0600====<end');
console.log('ACTS_ABatchInsert_0600====<end');
done();
},
);
} catch (err) {
console.error('=ACTS_BatchInsert_0600 catch(err)====>:' + err);
console.log('ACTS_BatchInsert_0600====<end catch');
console.error('=ACTS_ABatchInsert_0600 catch(err)====>:' + err);
console.log('ACTS_ABatchInsert_0600====<end catch');
done();
}
})
/*
* @tc.number: ACTS_Query_0400
* @tc.number: ACTS_AQuery_0400
* @tc.name: Queries one or more data records in the database
* @tc.desc: Check the return value of the interface (by AsyncCallback)
*/
it('ACTS_Query_0400', 0, async function (done) {
console.log('ACTS_Query_0400====<begin');
it('ACTS_AQuery_0400', 0, async function (done) {
console.log('ACTS_AQuery_0400====<begin');
var columnsArray = new Array("value1", "value2", "value3", "value4")
try {
let predicates = new ohosDataAbility.DataAbilityPredicates();
......@@ -162,27 +174,27 @@ it('ACTS_Query_0400', 0, async function (done) {
columnsArray,
predicates,
(err, data) => {
console.debug("=ACTS_Query_0400 query err,data=======>"
console.debug("=ACTS_AQuery_0400 query err,data=======>"
+ ("json err【") + JSON.stringify(err) + (" 】json data【")
+ JSON.stringify(data) + (" 】;") + " , " + data);
expect(typeof (data)).assertEqual("object");
console.log('ACTS_Query_0400====<end');
console.log('ACTS_AQuery_0400====<end');
done();
});
} catch (err) {
console.error('=ACTS_Query_0400 catch(err)====>:' + err);
console.log('ACTS_Query_0400====<end catch');
console.error('=ACTS_AQuery_0400 catch(err)====>:' + err);
console.log('ACTS_AQuery_0400====<end catch');
done();
}
})
/*
* @tc.number: ACTS_Update_0400
* @tc.number: ACTS_AUpdate_0400
* @tc.name: Updates one or more data records in the database.
* @tc.desc: Check the return value of the interface (by AsyncCallback)
*/
it('ACTS_Update_0400', 0, async function (done) {
console.log('ACTS_Update_0400====<begin');
it('ACTS_AUpdate_0400', 0, async function (done) {
console.log('ACTS_AUpdate_0400====<begin');
console.log('featureAbility Update getDataAbilityHelper ====>: ' + DAHelper)
try {
let predicates = new ohosDataAbility.DataAbilityPredicates();
......@@ -190,34 +202,34 @@ it('ACTS_Update_0400', 0, async function (done) {
predicates.limitAs(10);
predicates.orderByAsc("order_by_class");
predicates.offsetAs(1);
console.debug("=ACTS_Update_0400 predicates====>"
console.debug("=ACTS_AUpdate_0400 predicates====>"
+ ("json predicates 【") + JSON.stringify(predicates) + ("") + " , " + predicates);
await DAHelper.update(
dataAbilityUri,
valueBucket,
predicates,
(err, data) => {
console.debug("=ACTS_Update_0400 err,data=======>"
console.debug("=ACTS_AUpdate_0400 err,data=======>"
+ ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
expect(data).assertEqual(1);
console.log('ACTS_Update_0400====<end');
console.log('ACTS_AUpdate_0400====<end');
done();
},
);
} catch (err) {
console.error('=ACTS_Update_0400 catch(err)====>:' + err);
console.log('ACTS_Update_0400====<end catch');
console.error('=ACTS_AUpdate_0400 catch(err)====>:' + err);
console.log('ACTS_AUpdate_0400====<end catch');
done();
}
})
/*
* @tc.number: ACTS_Delete_0400
* @tc.number: ACTS_ADelete_0400
* @tc.name: Deletes one or more data records. This method should be implemented by a Data ability.
* @tc.desc: Check the return value of the interface (by AsyncCallback)
*/
it('ACTS_Delete_0400', 0, async function (done) {
console.log('ACTS_Delete_0400====<begin');
it('ACTS_ADelete_0400', 0, async function (done) {
console.log('ACTS_ADelete_0400====<begin');
console.log('featureAbility getDataAbilityHelper ====>: ' + DAHelper)
try {
let predicates = new ohosDataAbility.DataAbilityPredicates();
......@@ -225,32 +237,32 @@ it('ACTS_Delete_0400', 0, async function (done) {
predicates.limitAs(10);
predicates.orderByAsc("order_by_class");
predicates.offsetAs(1);
console.debug("=ACTS_Delete_0400 predicates====>"
console.debug("=ACTS_ADelete_0400 predicates====>"
+ ("json predicates 【") + JSON.stringify(predicates) + ("") + " , " + predicates);
await DAHelper.delete(
dataAbilityUri,
predicates,
(err, data) => {
console.debug("=ACTS_Delete_0400 err,data=======>"
console.debug("=ACTS_ADelete_0400 err,data=======>"
+ ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
expect(data).assertEqual(0);
console.log('ACTS_Delete_0400====<end');
console.log('ACTS_ADelete_0400====<end');
done();
});
} catch (err) {
console.error('=ACTS_Delete_0400 catch(err)====>:' + err);
console.log('ACTS_Delete_0400====<end catch');
console.error('=ACTS_ADelete_0400 catch(err)====>:' + err);
console.log('ACTS_ADelete_0400====<end catch');
done();
}
})
/*
* @tc.number: ACTS_GetFileTypes_0200
* @tc.number: ACTS_AGetFileTypes_0200
* @tc.name: Obtains the MIME type of files.
* @tc.desc: Check the return value of the interface (by AsyncCallback)
*/
it('ACTS_GetFileTypes_0200', 0, async function (done) {
console.log('ACTS_GetFileTypes_0200====<begin');
it('ACTS_AGetFileTypes_0200', 0, async function (done) {
console.log('ACTS_AGetFileTypes_0200====<begin');
console.log('featureAbility getFileTypes getDataAbilityHelper ====>: ' + DAHelper)
let mimeTypeFilter = '*/*'
try {
......@@ -258,12 +270,12 @@ it('ACTS_GetFileTypes_0200', 0, async function (done) {
dataAbilityUri,
mimeTypeFilter,
(err, data) => {
console.debug("=ACTS_GetFileTypes_0200 getFileTypes err,data=======>"
console.debug("=ACTS_AGetFileTypes_0200 getFileTypes err,data=======>"
+ ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
console.log('=ACTS_GetFileTypes_0200 data.length ====>: ' + data.length);
console.log('=ACTS_AGetFileTypes_0200 data.length ====>: ' + data.length);
for (var i = 0; i < data.length; i++) {
expect(typeof (data[i])).assertEqual("string");
console.log('=ACTS_GetFileTypes_0200 for data ====>: ' + err.code +
console.log('=ACTS_AGetFileTypes_0200 for data ====>: ' + err.code +
" data[" + i + "]: " + data[i]);
if (i == 0) {
expect(data[i]).assertEqual("hap");
......@@ -273,147 +285,147 @@ it('ACTS_GetFileTypes_0200', 0, async function (done) {
expect(data[i]).assertEqual("image/png");
}
}
console.log('ACTS_GetFileTypes_0200====<end');
console.log('ACTS_AGetFileTypes_0200====<end');
done();
},
);
} catch (err) {
console.error('=ACTS_GetFileTypes_0200 getFileTypes AsyncCallback catch(err)====>:' + err);
console.log('ACTS_GetFileTypes_0200====<end catch');
console.error('=ACTS_AGetFileTypes_0200 getFileTypes AsyncCallback catch(err)====>:' + err);
console.log('ACTS_AGetFileTypes_0200====<end catch');
done();
}
})
/*
* @tc.number: ACTS_GetType_0200
* @tc.number: ACTS_AGetType_0200
* @tc.name: Obtains the MIME type matching the data specified by the URI of the Data ability.
* @tc.desc: Check the return value of the interface (by AsyncCallback)
*/
it('ACTS_GetType_0200', 0, async function (done) {
console.log('ACTS_GetType_0200====<begin');
it('ACTS_AGetType_0200', 0, async function (done) {
console.log('ACTS_AGetType_0200====<begin');
console.log('featureAbility GetType getDataAbilityHelper ====>: ' + DAHelper)
try {
await DAHelper.getType(
dataAbilityUri,
(err, data) => {
console.debug("=ACTS_GetType_0200 err,data=======>"
console.debug("=ACTS_AGetType_0200 err,data=======>"
+ ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
expect(data).assertEqual(dataAbilityUri);
console.log('ACTS_GetType_0200====<end');
expect(data).assertEqual("hap");
console.log('ACTS_AGetType_0200====<end');
done();
},
);
} catch (err) {
console.error('=ACTS_GetType_0200 getType AsyncCallback catch(err)====>:' + err);
console.log('ACTS_GetType_0200====<end catch');
console.error('=ACTS_AGetType_0200 getType AsyncCallback catch(err)====>:' + err);
console.log('ACTS_AGetType_0200====<end catch');
done();
}
})
/*
* @tc.number: ACTS_OpenFile_0700
* @tc.number: ACTS_AOpenFile_0700
* @tc.name: Opens a file. This method should be implemented by a Data ability.
* @tc.desc: Check the return value of the interface (by AsyncCallback)
*/
it('ACTS_OpenFile_0700', 0, async function (done) {
console.log('ACTS_OpenFile_0700====<begin');
it('ACTS_AOpenFile_0700', 0, async function (done) {
console.log('ACTS_AOpenFile_0700====<begin');
let ret = false;
console.log('featureAbility ACTS_OpenFile_0700 OpenFile getDataAbilityHelper ====>: ' + DAHelper)
console.log('featureAbility ACTS_AOpenFile_0700 OpenFile getDataAbilityHelper ====>: ' + DAHelper)
var mode = "r";
try {
DAHelper.openFile(
dataAbilityUri,
mode,
(err, data) => {
console.debug("=ACTS_OpenFile_0700 err,data=======>"
console.debug("=ACTS_AOpenFile_0700 err,data=======>"
+ ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
expect(typeof (data)).assertEqual("number");
console.log('DataAbilityHelper ACTS_OpenFile_0700 OpenFile asyncCallback errCode ====>: '
console.log('DataAbilityHelper ACTS_AOpenFile_0700 OpenFile asyncCallback errCode ====>: '
+ err.code + " data: " + data);
ret = true
done();
},
);
} catch (err) {
console.error('=ACTS_OpenFile_0700 getType AsyncCallback catch(err)====>:' + err);
console.error('=ACTS_AOpenFile_0700 getType AsyncCallback catch(err)====>:' + err);
ret = false
done();
}
setTimeout(function () {
console.log('setTimeout function====<');
}, gSetTimeout);
console.log('ACTS_OpenFile_0700====<end');
console.log('ACTS_AOpenFile_0700====<end');
})
/*
* @tc.number: ACTS_NormalizeUri_0200
* @tc.number: ACTS_ANormalizeUri_0200
* @tc.name: Converts the given uri that refer to the Data ability into a normalized URI.
* @tc.desc: Check the return value of the interface (by AsyncCallback)
*/
it('ACTS_NormalizeUri_0200', 0, async function (done) {
console.log('ACTS_NormalizeUri_0200====<begin');
it('ACTS_ANormalizeUri_0200', 0, async function (done) {
console.log('ACTS_ANormalizeUri_0200====<begin');
let ret = false;
console.log('featureAbility normalizeUri getDataAbilityHelper ====>: ' + DAHelper)
try {
DAHelper.normalizeUri(
dataAbilityUri,
(err, data) => {
console.debug("=ACTS_NormalizeUri_0200 err,data=======>"
console.debug("=ACTS_ANormalizeUri_0200 err,data=======>"
+ ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
expect(data).assertEqual(dataAbilityUri);
console.log('ACTS_NormalizeUri_0200====<end');
console.log('ACTS_ANormalizeUri_0200====<end');
done();
},
);
} catch (err) {
console.error('=ACTS_NormalizeUri_0200 normalizeUri AsyncCallback catch(err)====>:' + err);
console.log('ACTS_NormalizeUri_0200====<end catch');
console.error('=ACTS_ANormalizeUri_0200 normalizeUri AsyncCallback catch(err)====>:' + err);
console.log('ACTS_ANormalizeUri_0200====<end catch');
done();
}
})
/*
* @tc.number: ACTS_DenormalizeUri_0200
* @tc.number: ACTS_ADenormalizeUri_0200
* @tc.name: Converts the given normalized uri generated by normalizeUri into a denormalized one.
* @tc.desc: Check the return value of the interface (by AsyncCallback)
*/
it('ACTS_DenormalizeUri_0200', 0, async function (done) {
console.log('ACTS_DenormalizeUri_0200====<begin');
it('ACTS_ADenormalizeUri_0200', 0, async function (done) {
console.log('ACTS_ADenormalizeUri_0200====<begin');
let ret = false;
console.log('featureAbility DenormalizeUri getDataAbilityHelper ====>: ' + DAHelper)
try {
DAHelper.denormalizeUri(
dataAbilityUri,
(err, data) => {
console.debug("=ACTS_DenormalizeUri_0200 err,data=======>"
console.debug("=ACTS_ADenormalizeUri_0200 err,data=======>"
+ ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data) + (" 】;"));
expect(data).assertEqual(dataAbilityUri);
console.log('ACTS_DenormalizeUri_0200====<end');
console.log('ACTS_ADenormalizeUri_0200====<end');
done();
},
);
} catch (err) {
console.error('=ACTS_DenormalizeUri_0200 denormalizeUri AsyncCallback catch(err)====>:' + err);
console.log('ACTS_DenormalizeUri_0200====<end catch');
console.error('=ACTS_ADenormalizeUri_0200 denormalizeUri AsyncCallback catch(err)====>:' + err);
console.log('ACTS_ADenormalizeUri_0200====<end catch');
done();
}
})
/*
* @tc.number: ACTS_OnOff_0100
* @tc.number: ACTS_AOnOff_0100
* @tc.name: On/Off : Registers an observer to observe data specified by the given Uri
* @tc.desc: Check the return value of the interface ()
*/
it('ACTS_OnOff_0100', 0, async function (done) {
console.log('ACTS_OnOff_0100====<begin');
it('ACTS_AOnOff_0100', 0, async function (done) {
console.log('ACTS_AOnOff_0100====<begin');
gSetTimeout = 2000;
try {
var currentAlertTimeout;
function onAsyncCallback0100(err) {
expect(err.code).assertEqual(0);
DAHelper.off("dataChange", dataAbilityUri, onAsyncCallback0100);
console.log('ACTS_OnOff_0100====<end');
console.log('ACTS_AOnOff_0100====<end');
gSetTimeout = 500;
done();
}
......@@ -421,39 +433,39 @@ it('ACTS_OnOff_0100', 0, async function (done) {
setTimeout(mySetTimeout, gSetTimeout);
function mySetTimeout() {
console.debug('ACTS_OnOff_0100====< mySetTimeout');
console.debug('ACTS_AOnOff_0100====< mySetTimeout');
DAHelper.notifyChange(
dataAbilityUri,
(err) => {
console.debug("=ACTS_OnOff_0100 err=======>"
console.debug("=ACTS_AOnOff_0100 err=======>"
+ ("err【") + JSON.stringify(err) + ("") + " , " + err);
expect(err.code).assertEqual(0);
}
);
}
} catch (err) {
console.error('=ACTS_OnOff_0100 catch(err)====>:' + err);
console.log('ACTS_OnOff_0100====<end catch');
console.error('=ACTS_AOnOff_0100 catch(err)====>:' + err);
console.log('ACTS_AOnOff_0100====<end catch');
gSetTimeout = 500;
done();
}
})
/*
* @tc.number: ACTS_OnOff_0200
* @tc.number: ACTS_AOnOff_0200
* @tc.name: On/Off : Registers an observer to observe data specified by the given Uri
* @tc.desc: Check the return value of the interface (by AsyncCallback)
*/
it('ACTS_OnOff_0200', 0, async function (done) {
console.log('ACTS_OnOff_0200====<begin');
it('ACTS_AOnOff_0200', 0, async function (done) {
console.log('ACTS_AOnOff_0200====<begin');
gSetTimeout = 2000;
try {
var currentAlertTimeout;
function onAsyncCallback0200(err) {
console.debug("=ACTS_OnOff_0200 onAsyncCallback0200=======>");
console.debug("=ACTS_AOnOff_0200 onAsyncCallback0200=======>");
expect(false).assertTrue();
clearTimeout(currentAlertTimeout);
console.log('ACTS_OnOff_0200====<end callback_0200');
console.log('ACTS_AOnOff_0200====<end callback_0200');
done();
}
DAHelper.on("dataChange", dataAbilityUri, onAsyncCallback0200);
......@@ -466,15 +478,15 @@ it('ACTS_OnOff_0200', 0, async function (done) {
dataAbilityUri,
(err) => {
if (err.code != 0) {
console.debug("=ACTS_OnOff_0200 err=======>"
console.debug("=ACTS_AOnOff_0200 err=======>"
+ ("err【") + JSON.stringify(err) + ("") + " , " + err);
expect(false).assertTrue();
console.log('ACTS_OnOff_0200====<end err.code');
console.log('ACTS_AOnOff_0200====<end err.code');
done();
} else {
currentAlertTimeout = setTimeout(() => {
expect(err.code).assertEqual(0);
console.log('ACTS_OnOff_0200====<end');
console.log('ACTS_AOnOff_0200====<end');
done();
}, gSetTimeout);
}
......@@ -482,20 +494,20 @@ it('ACTS_OnOff_0200', 0, async function (done) {
);
}
} catch (err) {
console.error('=ACTS_OnOff_0200 catch(err)====>:' + err);
console.log('ACTS_OnOff_0200====<end catch');
console.error('=ACTS_AOnOff_0200 catch(err)====>:' + err);
console.log('ACTS_AOnOff_0200====<end catch');
done();
}
})
/*
* @tc.number: ACTS_ExecuteBatch_Insert_0400
* @tc.number: ACTS_AExecuteBatch_Insert_0400
* @tc.name: ExecuteBatch : Preforms batch operations on the database
* @tc.desc: Check the return value of the interface (by AsyncCallback)
*/
it('ACTS_ExecuteBatch_Insert_0400', 0, async function (done) {
console.debug('ACTS_ExecuteBatch_Insert_0400====<begin');
it('ACTS_AExecuteBatch_Insert_0400', 0, async function (done) {
console.debug('ACTS_AExecuteBatch_Insert_0400====<begin');
try {
DAHelper.executeBatch(dataAbilityUri,
[
......@@ -507,33 +519,34 @@ it('ACTS_ExecuteBatch_Insert_0400', 0, async function (done) {
expectedCount: 1,
PredicatesBackReferences: {},
interrupted: true,
valueBackReferences: valueBucket,
}
],
(err, data) => {
console.debug("=ACTS_ExecuteBatch_Insert_0400 executeBatch err,data====>"
console.debug("=ACTS_AExecuteBatch_Insert_0400 executeBatch err,data====>"
+ ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data)
+ (" 】;") + data.length);
expect(err.code).assertEqual(0);
expect(data.length).assertEqual(0);
console.debug('ACTS_ExecuteBatch_Insert_0400====<end');
console.debug('ACTS_AExecuteBatch_Insert_0400====<end');
done();
}
);
} catch (err) {
console.error('=ACTS_ExecuteBatch_Insert_0400 catch(err)====>:'
console.error('=ACTS_AExecuteBatch_Insert_0400 catch(err)====>:'
+ ("json err 【") + JSON.stringify(err) + (" 】 ,") + err);
console.debug('ACTS_ExecuteBatch_Insert_0400====<end catch');
console.debug('ACTS_AExecuteBatch_Insert_0400====<end catch');
done();
}
})
/*
* @tc.number: ACTS_ExecuteBatch_Update_0400
* @tc.number: ACTS_AExecuteBatch_Update_0400
* @tc.name: ExecuteBatch : Preforms batch operations on the database
* @tc.desc: Check the return value of the interface (by AsyncCallback)
*/
it('ACTS_ExecuteBatch_Update_0400', 0, async function (done) {
console.debug('ACTS_ExecuteBatch_Update_0400====<begin');
it('ACTS_AExecuteBatch_Update_0400', 0, async function (done) {
console.debug('ACTS_AExecuteBatch_Update_0400====<begin');
try {
let predicates = new ohosDataAbility.DataAbilityPredicates();
predicates.equalTo('contact_id', 1);
......@@ -551,39 +564,40 @@ it('ACTS_ExecuteBatch_Update_0400', 0, async function (done) {
expectedCount: 1,
PredicatesBackReferences: {},
interrupted: true,
valueBackReferences: valueBucket,
}
],
(err, DataAbilityResult) => {
console.debug("=ACTS_ExecuteBatch_Update_0400 executeBatch err,data====>"
console.debug("=ACTS_AExecuteBatch_Update_0400 executeBatch err,data====>"
+ ("json err【") + JSON.stringify(err) + (" 】json data【")
+ JSON.stringify(DataAbilityResult) + (" 】;") + DataAbilityResult.length);
for (var i = 0; i < DataAbilityResult.length; i++) {
console.debug('=ACTS_ExecuteBatch_Update_0400 for data[' + i + '].uri ====>: '
console.debug('=ACTS_AExecuteBatch_Update_0400 for data[' + i + '].uri ====>: '
+ DataAbilityResult[i].uri)
expect(DataAbilityResult[i].uri).assertEqual(dataAbilityUri);
console.debug('=ACTS_ExecuteBatch_Update_0400 for data[' + i + '].count ====>: '
console.debug('=ACTS_AExecuteBatch_Update_0400 for data[' + i + '].count ====>: '
+ DataAbilityResult[i].count)
expect(DataAbilityResult[i].count).assertEqual(1);
}
console.debug('ACTS_ExecuteBatch_Update_0400====<end');
console.debug('ACTS_AExecuteBatch_Update_0400====<end');
done();
}
);
} catch (err) {
console.error('=ACTS_ExecuteBatch_Update_0400 catch(err)====>:'
console.error('=ACTS_AExecuteBatch_Update_0400 catch(err)====>:'
+ ("json err 【") + JSON.stringify(err) + (" 】 ,") + err);
console.debug('ACTS_ExecuteBatch_Update_0400====<end catch');
console.debug('ACTS_AExecuteBatch_Update_0400====<end catch');
done();
}
})
/*
* @tc.number: ACTS_ExecuteBatch_Assert_0400
* @tc.number: ACTS_AExecuteBatch_Assert_0400
* @tc.name: ExecuteBatch : Preforms batch operations on the database
* @tc.desc: Check the return value of the interface (by AsyncCallback)
*/
it('ACTS_ExecuteBatch_Assert_0400', 0, async function (done) {
console.debug('ACTS_ExecuteBatch_Assert_0400====<begin');
it('ACTS_AExecuteBatch_Assert_0400', 0, async function (done) {
console.debug('ACTS_AExecuteBatch_Assert_0400====<begin');
try {
let predicates = new ohosDataAbility.DataAbilityPredicates();
predicates.equalTo('contact_id', 1);
......@@ -601,32 +615,33 @@ it('ACTS_ExecuteBatch_Assert_0400', 0, async function (done) {
expectedCount: 1,
PredicatesBackReferences: {},
interrupted: true,
valueBackReferences: valueBucket,
}
],
(err, data) => {
console.debug("=ACTS_ExecuteBatch_Assert_0400 executeBatch err,data====>"
console.debug("=ACTS_AExecuteBatch_Assert_0400 executeBatch err,data====>"
+ ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(data)
+ (" 】;") + data.length);
expect(data.length).assertEqual(0);
console.debug('ACTS_ExecuteBatch_Assert_0400====<end');
console.debug('ACTS_AExecuteBatch_Assert_0400====<end');
done();
}
);
} catch (err) {
console.error('=ACTS_ExecuteBatch_Assert_0400 catch(err)====>:'
console.error('=ACTS_AExecuteBatch_Assert_0400 catch(err)====>:'
+ ("json err 【") + JSON.stringify(err) + (" 】 ,") + err);
console.debug('ACTS_ExecuteBatch_Assert_0400====<end catch');
console.debug('ACTS_AExecuteBatch_Assert_0400====<end catch');
done();
}
})
/*
* @tc.number: ACTS_ExecuteBatch_Delete_0400
* @tc.number: ACTS_AExecuteBatch_Delete_0400
* @tc.name: ExecuteBatch : Preforms batch operations on the database
* @tc.desc: Check the return value of the interface (by AsyncCallback)
*/
it('ACTS_ExecuteBatch_Delete_0400', 0, async function (done) {
console.debug('ACTS_ExecuteBatch_Delete_0400====<begin');
it('ACTS_AExecuteBatch_Delete_0400', 0, async function (done) {
console.debug('ACTS_AExecuteBatch_Delete_0400====<begin');
try {
let predicates = new ohosDataAbility.DataAbilityPredicates();
predicates.equalTo('contact_id', 1);
......@@ -644,60 +659,61 @@ it('ACTS_ExecuteBatch_Delete_0400', 0, async function (done) {
expectedCount: 1,
PredicatesBackReferences: {},
interrupted: true,
valueBackReferences: valueBucket,
}
],
(err, DataAbilityResult) => {
console.debug("=ACTS_ExecuteBatch_Delete_0400 executeBatch err,data====>"
console.debug("=ACTS_AExecuteBatch_Delete_0400 executeBatch err,data====>"
+ ("json err【") + JSON.stringify(err) + (" 】json data【") + JSON.stringify(DataAbilityResult)
+ (" 】;") + DataAbilityResult.length);
for (var i = 0; i < DataAbilityResult.length; i++) {
console.debug('=ACTS_ExecuteBatch_Delete_0400 for data[' + i + '].uri ====>: '
console.debug('=ACTS_AExecuteBatch_Delete_0400 for data[' + i + '].uri ====>: '
+ DataAbilityResult[i].uri)
expect(DataAbilityResult[i].uri).assertEqual(dataAbilityUri);
console.debug('=ACTS_ExecuteBatch_Delete_0400 for data[' + i + '].count ====>: '
console.debug('=ACTS_AExecuteBatch_Delete_0400 for data[' + i + '].count ====>: '
+ DataAbilityResult[i].count)
expect(DataAbilityResult[i].count).assertEqual(1);
}
console.debug('ACTS_ExecuteBatch_Delete_0400====<end');
console.debug('ACTS_AExecuteBatch_Delete_0400====<end');
done();
}
);
} catch (err) {
console.error('=ACTS_ExecuteBatch_Delete_0400 catch(err)====>:'
console.error('=ACTS_AExecuteBatch_Delete_0400 catch(err)====>:'
+ ("json err 【") + JSON.stringify(err) + (" 】 ,") + err);
console.debug('ACTS_ExecuteBatch_Delete_0400====<end catch');
console.debug('ACTS_AExecuteBatch_Delete_0400====<end catch');
done();
}
})
/*
* @tc.number: ACTS_Release_0100
* @tc.number: ACTS_ARelease_0100
* @tc.name: Releases the client resource of the Data ability.
* @tc.desc: Check the return value of the interface (by promise)
*/
it('ACTS_Release_0100', 0, async function (done) {
console.log('ACTS_Release_0100====<begin');
it('ACTS_ARelease_0100', 0, async function (done) {
console.log('ACTS_ARelease_0100====<begin');
var rDAHelper
try {
rDAHelper = featureAbility.acquireDataAbilityHelper(dataAbilityUri);
console.debug('ACTS_beforeAll rDAHelper ====>: ' + rDAHelper + " ,JSON. " + JSON.stringify(rDAHelper));
console.debug('ACTS_AbeforeAll rDAHelper ====>: ' + rDAHelper + " ,JSON. " + JSON.stringify(rDAHelper));
expect(typeof (rDAHelper)).assertEqual("object");
rDAHelper.release().then((data) => {
console.debug("=ACTS_Release_0100 then data====>"
console.debug("=ACTS_ARelease_0100 then data====>"
+ ("json data 【") + JSON.stringify(data) + ("") + " , " + data);
expect(data).assertEqual(true);
console.log('ACTS_Release_0100====<end');
console.log('ACTS_ARelease_0100====<end');
done();
}).catch(err => {
console.debug("=ACTS_Release_0100 catch err ====>"
console.debug("=ACTS_ARelease_0100 catch err ====>"
+ ("json err 【") + JSON.stringify(err) + (""));
expect(false).assertTrue();
console.log('ACTS_Release_0100====<end .catch');
console.log('ACTS_ARelease_0100====<end .catch');
done();
});
} catch (err) {
console.error('=ACTS_Release_0100 release promise catch(err)====>:' + err);
console.log('ACTS_Release_0100====<end catch(err)');
console.error('=ACTS_ARelease_0100 release promise catch(err)====>:' + err);
console.log('ACTS_ARelease_0100====<end catch(err)');
done();
}
})
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Copyright (c) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Copyright (C) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
# Copyright (C) 2021 Huawei Device Co., Ltd.
# Copyright (C) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Copyright (c) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Copyright (C) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......@@ -23,72 +23,24 @@ describe('ActsStServiceAbilityTest', function () {
let bundleName = "com.amsst.stserviceabilityserver";
let abilityName = "com.amsst.stserviceabilityserver.ServiceAbility";
var subscriber0100;
var CommonEventSubscribeInfo0100 = {
events: ["ACTS_SerivceAbilityServer_onCommand_PageStartService_0100",
],
};
var subscriber0200;
var CommonEventSubscribeInfo0200 = {
events: ["ACTS_SerivceAbilityServer_onCommand_PageStartService_0200",
],
};
var subscriber0300;
var CommonEventSubscribeInfo0300 = {
events: ["ACTS_SerivceAbilityServer_onCommand_PageStartService_0300",
"ACTS_SerivceAbilityServer_onCommand_PageStartService_0301",
],
};
var subscriber0400;
var CommonEventSubscribeInfo0400 = {
events: ["ACTS_SerivceAbilityServer_onCommand_PageStartService_0400",
"ACTS_SerivceAbilityServer_onCommand_PageStartService_0401",
],
};
var subscriber0500;
var CommonEventSubscribeInfo0500 = {
events: ["ACTS_SerivceAbilityServer_onConnect_PageConnectService_0500",
"ACTS_SerivceAbilityServer_onDisConnect",
],
};
var subscriber0600;
var CommonEventSubscribeInfo0600 = {
events: ["ACTS_SerivceAbilityServer_onConnect_PageConnectService_0600",
"ACTS_SerivceAbilityServer_onDisConnect",
],
};
var subscriber0900;
var CommonEventSubscribeInfo0900 = {
events: ["ACTS_SerivceAbilityServerSecond_onCommand_ServiceStartService_0900",
],
};
var subscriber1000;
var CommonEventSubscribeInfo1000 = {
events: ["ACTS_SerivceAbilityServerSecond_onCommand_ServiceStartService_1000",
],
};
var subscriber1300;
var CommonEventSubscribeInfo1300 = {
events: ["ACTS_SerivceAbilityServerSecond_onConnect_ServiceConnectService_1300",
"ACTS_SerivceAbilityServerSecond_onDisConnect",
events: ["ACTS_ASerivceAbilityServer_onConnect_PageConnectService_0600",
"ACTS_ASerivceAbilityServer_onDisConnect",
],
};
var subscriber1400;
var CommonEventSubscribeInfo1400 = {
events: ["ACTS_SerivceAbilityServerSecond_onConnect_ServiceConnectService_1400",
"ACTS_SerivceAbilityServerSecond_onDisConnect",
],
};
var subscriber1500;
var CommonEventSubscribeInfo1500 = {
events: ["ACTS_SerivceAbilityServerSecond_onConnect_ServiceConnectService_1500",
"ACTS_SerivceAbilityServer_onDisConnect",
events: ["ACTS_ASerivceAbilityServerSecond_onConnect_ServiceConnectService_1400",
"ACTS_ASerivceAbilityServerSecond_onDisConnect",
],
};
function unsubscribe(caller, subscriber) {
commonEvent.unsubscribe(subscriber, (err, data) => {
console.debug("=ACTS_unsubscribe (err,data)=======>"
console.debug("=ACTS_Aunsubscribe (err,data)=======>"
+ (caller)
+ (" , json err【") + JSON.stringify(err) + ("")
+ ("json data【") + JSON.stringify(data) + ("")
......@@ -97,8 +49,8 @@ describe('ActsStServiceAbilityTest', function () {
}
let gSetTimeout = 1000
beforeAll(async (done) => {
console.debug('= ACTS_beforeAll 1127 ====<begin');
console.debug('= ACTS_beforeAll ====<end');
console.debug('= ACTS_AbeforeAll 1541 ====<begin');
console.debug('= ACTS_AbeforeAll ====<end');
done();
})
beforeEach(async (done) => {
......@@ -112,22 +64,22 @@ describe('ActsStServiceAbilityTest', function () {
}, gSetTimeout);
})
afterAll((done) => {
console.debug('= ACTS_afterAll ====<begin');
console.debug('= ACTS_AafterAll ====<begin');
setTimeout(function () {
console.debug('= ACTS_afterAll ====<end');
console.debug('= ACTS_AafterAll ====<end');
featureAbility.terminateSelf();
done();
}, gSetTimeout);
})
/*
* @tc.number ACTS_AbilityStartSetting_0100
* @tc.number ACTS_AAbilityStartSetting_0100
* @tc.name The configured URI is started and the page is not configured
* @tc.desc Function test
* @tc.level 0
*/
it("ACTS_AbilityStartSetting_0100",0, async function(done){
console.info("ACTS_------------------logMessage 1 ACTS_AbilityStartSetting_0100-------------------");
it("ACTS_AAbilityStartSetting_0100",0, async function(done){
console.info("ACTS_AlogMessage 1 ACTS_AAbilityStartSetting_0100-------------------");
try{
let Want = {
bundleName: "com.example.abilityStartSettingApp",
......@@ -147,71 +99,223 @@ describe('ActsStServiceAbilityTest', function () {
}
featureAbility.startAbility(StartAbilityParameter,(err,data)=>{
console.log('ACTS_AbilityStartSetting_0100 asyncCallback errCode : ' + JSON.stringify(err)
console.log('ACTS_AAbilityStartSetting_0100 asyncCallback errCode : ' + JSON.stringify(err)
+ " data: " + JSON.stringify(data));
expect(2097152).assertEqual(err.code);
done();
});
}catch(error){
console.log("ACTS_AbilityStartSetting_0100 : error = " + error);
console.log("ACTS_AAbilityStartSetting_0100 : error = " + error);
done();
}
})
/*
* @tc.number: ACTS_JsServiceAbility_0600
* @tc.number ACTS_AAbilityStartSettingNew_0200
* @tc.name The configured URI is started and the page is not configured
* @tc.desc Function test
* @tc.level 0
*/
it("ACTS_AAbilityStartSettingNew_0200",0, async function(done){
console.info("ACTS_logMessage 1 ACTS_AAbilityStartSettingNew_0200-------------------");
try{
let Want = {
bundleName: "com.example.abilityStartSettingApp2",
abilityName: "com.example.abilityStartSettingApp.MainAbility",
}
let abilityStartSetting ={
[featureAbility.AbilityStartSetting.BOUNDS_KEY] : [100,200,300,400],
[featureAbility.AbilityStartSetting.WINDOW_MODE_KEY] :
featureAbility.AbilityWindowConfiguration.WINDOW_MODE_UNDEFINED,
[featureAbility.AbilityStartSetting.DISPLAY_ID_KEY] : 1,
}
var StartAbilityParameter = {
want:Want,
abilityStartSetting:abilityStartSetting
}
featureAbility.startAbility(StartAbilityParameter,(err,data)=>{
console.log('ACTS_AAbilityStartSettingNew_0200 asyncCallback errCode : ' + JSON.stringify(err)
+ " data: " + JSON.stringify(data));
expect(2097152).assertEqual(err.code);
done();
});
}catch(error){
console.log("ACTS_AAbilityStartSettingNew_0200 : error = " + error);
done();
}
})
/*
* @tc.number ACTS_AAbilityStartSettingNew_0300
* @tc.name The configured URI is started and the page is not configured
* @tc.desc Function test
* @tc.level 0
*/
it("ACTS_AAbilityStartSettingNew_0300",0, async function(done){
console.info("ACTS_logMessage 1 ACTS_AAbilityStartSettingNew_0300-------------------");
try{
let Want = {
bundleName: "com.example.abilityStartSettingApp",
abilityName: "com.example.abilityStartSettingApp.MainAbility2",
}
let abilityStartSetting ={
[featureAbility.AbilityStartSetting.BOUNDS_KEY] : [100,200,300,400],
[featureAbility.AbilityStartSetting.WINDOW_MODE_KEY] :
featureAbility.AbilityWindowConfiguration.WINDOW_MODE_SPLIT_PRIMARY,
[featureAbility.AbilityStartSetting.DISPLAY_ID_KEY] : 1,
}
var StartAbilityParameter = {
want:Want,
abilityStartSetting:abilityStartSetting
}
featureAbility.startAbility(StartAbilityParameter,(err,data)=>{
console.log('ACTS_AAbilityStartSettingNew_0300 asyncCallback errCode : ' + JSON.stringify(err)
+ " data: " + JSON.stringify(data));
expect(2097152).assertEqual(err.code);
done();
});
}catch(error){
console.log("ACTS_AAbilityStartSettingNew_0300 : error = " + error);
done();
}
})
/*
* @tc.number ACTS_AAbilityStartSettingNew_0400
* @tc.name The configured URI is started and the page is not configured
* @tc.desc Function test
* @tc.level 0
*/
it("ACTS_AAbilityStartSettingNew_0400",0, async function(done){
console.info("ACTS_logMessage 1 ACTS_AAbilityStartSettingNew_0400-------------------");
try{
let Want = {
bundlame: "com.example.abilityStartSettingApp",
abilityName: "com.example.abilityStartSettingApp.MainAbility",
}
let abilityStartSetting ={
[featureAbility.AbilityStartSetting.BOUNDS_KEY] : [100,200,300,400],
[featureAbility.AbilityStartSetting.WINDOW_MODE_KEY] :
featureAbility.AbilityWindowConfiguration.WINDOW_MODE_SPLIT_SECONDARY,
[featureAbility.AbilityStartSetting.DISPLAY_ID_KEY] : 1,
}
var StartAbilityParameter = {
want:Want,
abilityStartSetting:abilityStartSetting
}
featureAbility.startAbility(StartAbilityParameter,(err,data)=>{
console.log('ACTS_AAbilityStartSettingNew_0400 asyncCallback errCode : ' + JSON.stringify(err)
+ " data: " + JSON.stringify(data));
expect(2097152).assertEqual(err.code);
done();
});
}catch(error){
console.log("ACTS_AAbilityStartSettingNew_0400 : error = " + error);
done();
}
})
/*
* @tc.number ACTS_AAbilityStartSettingNew_0500
* @tc.name The configured URI is started and the page is not configured
* @tc.desc Function test
* @tc.level 0
*/
it("ACTS_AAbilityStartSettingNew_0500",0, async function(done){
console.info("ACTS_--------ACTS_AAbilityStartSettingNew_0500------");
try{
let Want = {
bundleName: "com.example.abilityStartSettingApp",
abilityName: "com.example.abilityStartSettingApp.MainAbility",
}
let abilityStartSetting ={
[featureAbility.AbilityStartSetting.BOUNDS_KEY] : [100,200,300,400],
[featureAbility.AbilityStartSetting.WINDOW_MODE_KEY] :
featureAbility.AbilityWindowConfiguration.WINDOW_MODE_FLOATING,
[featureAbility.AbilityStartSetting.DISPLAY_ID_KEY] : 1,
}
var StartAbilityParameter = {
want:Want,
abilityStartSetting:abilityStartSetting
}
featureAbility.startAbility(StartAbilityParameter,(err,data)=>{
console.log('ACTS_AAbilityStartSettingNew_0500 asyncCallback errCode : ' + JSON.stringify(err)
+ " data: " + JSON.stringify(data));
expect(2097152).assertEqual(err.code);
done();
});
}catch(error){
console.log("ACTS_AAbilityStartSettingNew_0500 : error = " + error);
done();
}
})
/*
* @tc.number: ACTS_AJsServiceAbility_0600
* @tc.name: featureAbility.ConnectAbility : Connects an ability to a Service ability.
* @tc.desc: Check the return value of the interface (by AsyncCallback)
*/
it('ACTS_JsServiceAbility_0600', 0, async function (done) {
console.log('ACTS_JsServiceAbility_0600====<begin');
it('ACTS_AJsServiceAbility_0600', 0, async function (done) {
console.log('ACTS_AJsServiceAbility_0600====<begin');
try {
var mConnIdJsAsyncCallback;
commonEvent.createSubscriber(CommonEventSubscribeInfo0600).then(async (data) => {
console.debug("=ACTS_JsServiceAbility_0600 createSubscriber .then(data)=======>"
console.debug("=ACTS_AJsServiceAbility_0600 createSubscriber .then(data)=======>"
+ ("json data【") + JSON.stringify(data) + ("")
+ " ,data=" + data);
subscriber0600 = data;
await commonEvent.subscribe(subscriber0600, async (err, data) => {
console.debug("=ACTS_JsServiceAbility_0600 subscribe (err,data)=======>"
console.debug("=ACTS_AJsServiceAbility_0600 subscribe (err,data)=======>"
+ ("json err【") + JSON.stringify(err) + ("")
+ ("json data【") + JSON.stringify(data) + ("")
+ " ,err=" + err + " ,data=" + data);
if (data.event != "ACTS_SerivceAbilityServer_onDisConnect") {
expect("ACTS_SerivceAbilityServer_onConnect_PageConnectService_0600").assertEqual(
if (data.event != "ACTS_ASerivceAbilityServer_onDisConnect") {
expect("ACTS_ASerivceAbilityServer_onConnect_PageConnectService_0600").assertEqual(
data.event);
featureAbility.disconnectAbility(mConnIdJsAsyncCallback, (err) => {
console.debug("=ACTS_JsServiceAbility_0600 disconnectAbility err====>"
console.debug("=ACTS_AJsServiceAbility_0600 disconnectAbility err====>"
+ ("json err=") + JSON.stringify(err));
})
} else {
clearTimeout(currentAlertTimeout);
expect("ACTS_SerivceAbilityServer_onDisConnect").assertEqual(
expect("ACTS_ASerivceAbilityServer_onDisConnect").assertEqual(
data.event);
unsubscribe("ACTS_JsServiceAbility_0600_unsubscribe", subscriber0600);
console.log('ACTS_JsServiceAbility_0600====<end')
unsubscribe("ACTS_AJsServiceAbility_0600_unsubscribe", subscriber0600);
console.log('ACTS_AJsServiceAbility_0600====<end')
done();
}
});
})
function onConnectCallback(element, remote) {
console.debug('ACTS_JsServiceAbility_0600_onConnectCallback ====> mConnIdJsAsyncCallback='
console.debug('ACTS_AJsServiceAbility_0600_onConnectCallback ====> mConnIdJsAsyncCallback='
+ JSON.stringify(mConnIdJsAsyncCallback) + " , " + mConnIdJsAsyncCallback);
console.debug('ACTS_JsServiceAbility_0600_onConnectCallback ====> element='
console.debug('ACTS_AJsServiceAbility_0600_onConnectCallback ====> element='
+ JSON.stringify(element) + " , " + element);
console.debug('ACTS_JsServiceAbility_0600_onConnectCallback ====> remote='
console.debug('ACTS_AJsServiceAbility_0600_onConnectCallback ====> remote='
+ JSON.stringify(remote) + " , " + remote);
console.debug('ACTS_JsServiceAbility_0600_onConnectCallback ====> remote is proxy:'
console.debug('ACTS_AJsServiceAbility_0600_onConnectCallback ====> remote is proxy:'
+ (remote instanceof rpc.RemoteProxy));
}
function onDisconnectCallback(element) {
console.debug('ACTS_JsServiceAbility_0600_onDisconnectCallback ====> element='
console.debug('ACTS_AJsServiceAbility_0600_onDisconnectCallback ====> element='
+ JSON.stringify(element) + " , " + element);
}
function onFailedCallback(code) {
console.debug('ACTS_JsServiceAbility_0600_onFailedCallback ====> code='
console.debug('ACTS_AJsServiceAbility_0600_onFailedCallback ====> code='
+ JSON.stringify(code) + " , " + code)
expect(code==featureAbility.ErrorCode.ABILITY_NOT_FOUND
|| (code!=featureAbility.ErrorCode.NO_ERROR
......@@ -234,71 +338,71 @@ describe('ActsStServiceAbilityTest', function () {
)
currentAlertTimeout = setTimeout(mySetTimeout, gSetTimeout);
function mySetTimeout() {
console.log('ACTS_JsServiceAbility_1400====<end mySetTimeout')
console.log('ACTS_AJsServiceAbility_0600====<end mySetTimeout')
done();
}
} catch (err) {
clearTimeout(currentAlertTimeout);
console.log('ACTS_JsServiceAbility_0600====<end err=' + err)
console.log('ACTS_AJsServiceAbility_0600====<end err=' + err)
done();
}
})
/*
* @tc.number: ACTS_JsServiceAbility_1400
* @tc.number: ACTS_AJsServiceAbility_1400
* @tc.name: particleability.ConnectAbility : Connects an ability to a Service ability.
* @tc.desc: Check the return value of the interface (by AsyncCallback)
*/
it('ACTS_JsServiceAbility_1400', 0, async function (done) {
console.log('ACTS_JsServiceAbility_1400====<begin');
it('ACTS_AJsServiceAbility_1400', 0, async function (done) {
console.log('ACTS_AJsServiceAbility_1400====<begin');
try {
var mConnIdJsAsyncCallback;
var currentAlertTimeout;
commonEvent.createSubscriber(CommonEventSubscribeInfo1400).then(async (data) => {
console.debug("=ACTS_JsServiceAbility_1400 createSubscriber .then(data)=======>"
console.debug("=ACTS_AJsServiceAbility_1400 createSubscriber .then(data)=======>"
+ ("json data【") + JSON.stringify(data) + ("")
+ " ,data=" + data);
subscriber1400 = data;
await commonEvent.subscribe(subscriber1400, async (err, data) => {
console.debug("=ACTS_JsServiceAbility_1400 subscribe (err,data)=======>"
console.debug("=ACTS_AJsServiceAbility_1400 subscribe (err,data)=======>"
+ ("json err【") + JSON.stringify(err) + ("")
+ ("json data【") + JSON.stringify(data) + ("")
+ " ,err=" + err + " ,data=" + data);
if (data.event != "ACTS_SerivceAbilityServerSecond_onDisConnect") {
expect("ACTS_SerivceAbilityServerSecond_onConnect_ServiceConnectService_1400"
if (data.event != "ACTS_ASerivceAbilityServerSecond_onDisConnect") {
expect("ACTS_ASerivceAbilityServerSecond_onConnect_ServiceConnectService_1400"
).assertEqual(data.event);
featureAbility.disconnectAbility(mConnIdJsAsyncCallback, (err) => {
console.debug("=ACTS_JsServiceAbility_1400 disconnectAbility err====>"
console.debug("=ACTS_AJsServiceAbility_1400 disconnectAbility err====>"
+ ("json err=") + JSON.stringify(err));
})
} else {
clearTimeout(currentAlertTimeout);
expect("ACTS_SerivceAbilityServerSecond_onDisConnect").assertEqual(
expect("ACTS_ASerivceAbilityServerSecond_onDisConnect").assertEqual(
data.event);
unsubscribe("ACTS_JsServiceAbility_1400_unsubscribe", subscriber1400);
console.log('ACTS_JsServiceAbility_1400====<end')
unsubscribe("ACTS_AJsServiceAbility_1400_unsubscribe", subscriber1400);
console.log('ACTS_AJsServiceAbility_1400====<end')
done();
}
});
})
function onConnectCallback(element, remote) {
console.debug('ACTS_JsServiceAbility_1400_onConnectCallback ====> mConnIdJsAsyncCallback='
console.debug('ACTS_AJsServiceAbility_1400_onConnectCallback ====> mConnIdJsAsyncCallback='
+ JSON.stringify(mConnIdJsAsyncCallback) + " , " + mConnIdJsAsyncCallback);
console.debug('ACTS_JsServiceAbility_1400_onConnectCallback ====> element='
console.debug('ACTS_AJsServiceAbility_1400_onConnectCallback ====> element='
+ JSON.stringify(element) + " , " + element);
console.debug('ACTS_JsServiceAbility_1400_onConnectCallback ====> remote='
console.debug('ACTS_AJsServiceAbility_1400_onConnectCallback ====> remote='
+ JSON.stringify(remote) + " , " + remote);
console.debug('ACTS_JsServiceAbility_1400_onConnectCallback ====> remote is proxy:'
console.debug('ACTS_AJsServiceAbility_1400_onConnectCallback ====> remote is proxy:'
+ (remote instanceof rpc.RemoteProxy));
}
function onDisconnectCallback(element) {
console.debug('ACTS_JsServiceAbility_1400_onDisconnectCallback ====> element='
console.debug('ACTS_AJsServiceAbility_1400_onDisconnectCallback ====> element='
+ JSON.stringify(element) + " , " + element);
}
function onFailedCallback(code) {
console.debug('ACTS_JsServiceAbility_1400_onFailedCallback ====> code='
console.debug('ACTS_AJsServiceAbility_1400_onFailedCallback ====> code='
+ JSON.stringify(code) + " , " + code)
}
......@@ -317,12 +421,12 @@ describe('ActsStServiceAbilityTest', function () {
currentAlertTimeout = setTimeout(mySetTimeout, gSetTimeout);
function mySetTimeout() {
console.log('ACTS_JsServiceAbility_1400====<end mySetTimeout')
console.log('ACTS_AJsServiceAbility_1400====<end mySetTimeout')
done();
}
} catch (err) {
clearTimeout(currentAlertTimeout);
console.log('ACTS_JsServiceAbility_1400====<end err' + err)
console.log('ACTS_AJsServiceAbility_1400====<end err' + err)
done();
}
})
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
......@@ -17,6 +17,7 @@ group("aafwk_standard") {
testonly = true
if (is_standard_system) {
deps = [
"ActsAbilityLifecycleStateNewTest:ActsAbilityLifecycleStateNewTest",
"ActsDataAbilityJsTest:ActsDataAbilityJsTest",
"ActsKillProcessWithAccountApi7:ActsKillProcessWithAccountApi7",
"ActsStServiceAbilityClientCaseTest:ActsStServiceAbilityClientCaseTest",
......
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Copyright (c) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
......@@ -16,6 +16,6 @@ import("//test/xts/tools/build/suite.gni")
group("amsgetabilityprocessinfo") {
testonly = true
if (is_standard_system) {
deps = [ "actsprocessmanagejstest:ActsAbilityRunningInfosTest" ]
deps = [ "actsgetabilityprocessinfotest:ActsAbilityRunningInfosTest" ]
}
}
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Copyright (c) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Copyright (C) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......@@ -27,10 +27,19 @@ describe('ActsAbilityRunningInfosTest', function () {
function checkRunningAbility(name, dataInfo) {
for (let i = 0, len = dataInfo.length; i < len; i++) {
if (dataInfo[i].ability.abilityName == name) {
expect(dataInfo[i].ability.deviceId).assertEqual("");
expect(dataInfo[i].ability.uri).assertEqual(undefined);
expect(dataInfo[i].ability.ability).assertEqual(undefined);
expect(dataInfo[i].uid).assertLarger(10000);
expect(dataInfo[i].pid).assertLarger(500);
expect(dataInfo[i].startTime).assertLarger(3000);
expect(dataInfo[i].abilityState).assertLarger(0);
expect(dataInfo[i].abilityState==abilityManager.AbilityState.FOREGROUND ||
dataInfo[i].abilityState==abilityManager.AbilityState.BACKGROUNDING
|| (dataInfo[i].abilityState!=abilityManager.AbilityState.INITIAL
) || (dataInfo[i].abilityState!=abilityManager.AbilityState.FOREGROUNDING
) || (dataInfo[i].abilityState!=abilityManager.AbilityState.BACKGROUNDING
)).assertTrue();
return true;
}
}
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Copyright (c) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
......
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Copyright (c) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
# Copyright (C) 2021 Huawei Device Co., Ltd.
# Copyright (C) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
# Copyright (C) 2021 Huawei Device Co., Ltd.
# Copyright (C) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
# Copyright (C) 2021 Huawei Device Co., Ltd.
# Copyright (C) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
# Copyright (C) 2021 Huawei Device Co., Ltd.
# Copyright (C) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Copyright (c) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Copyright (c) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
......
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Copyright (c) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
<div class="container">
<text class="title">
{{ $t('strings.hello') }} {{ title }}
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册