提交 3df71b36 编写于 作者: Z zhaoyuan17

Account xts test code update 1120

Signed-off-by: Nzhaoyuan17 <zhaoyuan17@huawei.com>
上级 54116c10
......@@ -15,11 +15,11 @@ import("//build/ohos_var.gni")
group("account") {
testonly = true
if (is_standard_system) {
deps = [ "OsAccountTest_js:osaccount_js_test" ]
} else {
deps = [
"OsAccountTest_js:osaccount_js_test",
"appaccount:appaccount_hap",
"osaccount:osaccount_hap",
]
} else {
deps = []
}
}
# 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")
group("appaccount_hap") {
testonly = true
if (is_standard_system) {
deps = [
"actsaccountchangeonoff:ActsAccountChangeOnOff",
"actsaccounttest:ActsAccountTest",
"actsgetallaccounts:ActsGetAllAccounts",
"actssetchecksyncenable:ActsSetCheckSyncEnable",
"getallaccessibleaccounts:accessibleaccounts",
"sceneProject:appaccount_scene",
]
}
}
# 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("ActsAccountChangeOnOff") {
hap_profile = "./entry/src/main/config.json"
deps = [
":hjs_demo_js_assets",
":hjs_demo_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsAccountChangeOnOff"
}
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.example.actsaccountchangeonoff",
"shell-timeout": "60000"
},
"kits": [
{
"test-file-name": [
"ActsAccountChangeOnOff.hap",
"ActsAccountSceneOnOff.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
}
]
}
{
"app": {
"bundleName": "com.example.actsaccountchangeonoff",
"vendor": "example",
"version": {
"code": 1,
"name": "1.0"
},
"apiVersion": {
"compatible": 4,
"target": 5,
"releaseType": "Beta1"
}
},
"deviceConfig": {},
"module": {
"package": "com.example.actsaccountchangeonoff",
"name": ".MyApplication",
"deviceType": [
"phone"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "entry",
"moduleType": "entry"
},
"abilities": [
{
"skills": [
{
"entities": [
"entity.system.home"
],
"actions": [
"action.system.home"
]
}
],
"name": "com.example.actsaccountchangeonoff.MainAbility",
"icon": "$media:icon",
"description": "$string:mainability_description",
"label": "$string:app_name",
"type": "page",
"visible": true,
"launchType": "standard"
}
],
"js": [
{
"pages": [
"pages/index/index"
],
"name": "default",
"window": {
"designWidth": 720,
"autoDesignWidth": false
}
}
]
}
}
\ No newline at end of file
/*
* 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.
*/
export default {
onCreate() {
console.info('AceApplication onCreate');
},
onDestroy() {
console.info('AceApplication onDestroy');
}
};
{
"strings": {
"hello": "Hello",
"world": "World"
}
}
\ No newline at end of file
{
"strings": {
"hello": "您好",
"world": "世界"
}
}
\ No newline at end of file
.container {
flex-direction: column;
justify-content: center;
align-items: center;
}
.title {
font-size: 100px;
}
<div class="container">
<text class="title">
{{title}}
</text>
</div>
/*
* 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 file from '@system.file'
import {Core, ExpectExtend} from 'deccjsunit/index'
const injectRef = Object.getPrototypeOf(global) || global
injectRef.regeneratorRuntime = require('@babel/runtime/regenerator')
export default {
data: {
title: "测试on/off接口"
},
onInit() {
this.title = "测试on/off接口";
},
onShow() {
console.info('onShow finish')
const core = Core.getInstance()
const expectExtend = new ExpectExtend({
'id': 'extend'
})
core.addService('expect', expectExtend)
core.init()
const configService = core.getDefaultService('config')
configService.setConfig(this)
require('../../../test/List.test')
core.execute()
},
onReady() {
},
}
\ No newline at end of file
{
"string": [
{
"name": "app_name",
"value": "ActsAccountChangeOnOff"
},
{
"name": "mainability_description",
"value": "JS_Phone_Empty Feature Ability"
}
]
}
\ No newline at end of file
/*
* 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 account from '@ohos.account.appAccount'
import commonevent from '@ohos.commonevent'
import featureAbility from '@ohos.ability.featureability'
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
const TIMEOUT = 5000;
describe('ActsAccountChangeOnOff', async function () {
beforeAll(async function (done) {
console.debug("====>startAbility start====");
await featureAbility.startAbility(
{
want:
{
deviceId: "",
bundleName: "com.example.actsaccountsceneonoff",
abilityName: "com.example.actsaccountsceneonoff.MainAbility",
action: "action1",
parameters:
{},
},
},
);
setTimeout(done(), TIMEOUT);
});
/*
* @tc.number : ActsAccountChangeOnOff_0100
* @tc.name : Subscribe/unsubscribe to the change event of the specified application
* @tc.desc : Received the account information change to the authorized account of the subscription to change
* the additional information
*/
it('ActsAccountChangeOnOff_0100', 0, async function (done) {
console.debug("====>ActsAccountChangeOnOff_0100 start====>");
var appAccountManager = account.createAppAccountManager();
console.debug("====>creat appAccountManager finish");
console.debug("====>add account ActsAccountChangeOnOff_0100 start");
await appAccountManager.addAccount("changeonoff_first");
console.debug("====>enableAppAccess ActsAccountChangeOnOff_0100 start");
await appAccountManager.enableAppAccess("changeonoff_first", "com.example.actsaccountsceneonoff");
function unSubscriberCallback(err){
console.debug("====>unsubscribe 0100 err:" + JSON.stringify(err));
}
function subscriberCallback(err, data){
console.debug("====>subscriberCallback 0100 data:" + JSON.stringify(data));
expect(data.event).assertEqual("account_on_change_first");
expect(data.data).assertEqual("SUCCESS");
commonevent.unsubscribe(subscriber, unSubscriberCallback);
done();
}
function publishCallback(err){
console.debug("====>publish call back err:" + JSON.stringify(err));
setTimeout(async function (){
console.debug("====>setAccountExtraInfo start====");
console.debug("====>setAccountExtraInfo ActsAccountChangeOnOff_0100 start");
try{
await appAccountManager.setAccountExtraInfo("changeonoff_first", "change_extra");
}
catch(err){
console.error("====>setAccountExtraInfo fail err:" + JSON.stringify(err));
expect().assertFail();
done();
}
}, 500)
}
var commonEventSubscribeInfo = {
events: ["account_on_change_first"]
}
var subscriber
commonevent.createSubscriber(commonEventSubscribeInfo).then(function (data){
subscriber = data;
commonevent.subscribe(subscriber, subscriberCallback);
console.debug("====>subscribe ActsAccountChangeOnOff_0100 finish====")
});
var commonEventPublishData = {
code: 1
}
setTimeout(function (){
console.debug("====>publish event account_on_change 0100====");
commonevent.publish("account_on_change", commonEventPublishData, publishCallback);
}, 1000)
setTimeout(function(){
console.debug("====>time out ActsAccountChangeOnOff_0100====>");
}, TIMEOUT);
});
})
\ No newline at end of file
/*
* 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.
*/
require('./ExampleJsunit.test.js')
\ No newline at end of file
# 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("ActsAccountTest") {
hap_profile = "./entry/src/main/config.json"
deps = [
":hjs_demo_js_assets",
":hjs_demo_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsAccountTest"
}
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": "200000",
"package": "com.example.actsaccounttest",
"shell-timeout": "60000"
},
"kits": [
{
"test-file-name": [
"ActsAccountTest.hap",
"ActsAccountSceneAppAccess.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
}
]
}
{
"app": {
"bundleName": "com.example.actsaccounttest",
"vendor": "example",
"version": {
"code": 1,
"name": "1.0"
},
"apiVersion": {
"compatible": 4,
"target": 5,
"releaseType": "Beta1"
}
},
"deviceConfig": {},
"module": {
"package": "com.example.actsaccounttest",
"name": ".MyApplication",
"deviceType": [
"phone"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "entry",
"moduleType": "entry"
},
"abilities": [
{
"skills": [
{
"entities": [
"entity.system.home"
],
"actions": [
"action.system.home"
]
}
],
"name": "com.example.actsaccounttest.MainAbility",
"icon": "$media:icon",
"description": "$string:mainability_description",
"label": "$string:app_name",
"type": "page",
"visible": true,
"launchType": "standard"
}
],
"js": [
{
"pages": [
"pages/index/index"
],
"name": "default",
"window": {
"designWidth": 720,
"autoDesignWidth": false
}
}
]
}
}
\ No newline at end of file
/*
* 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.
*/
export default {
onCreate() {
console.info('AceApplication onCreate');
},
onDestroy() {
console.info('AceApplication onDestroy');
}
};
{
"strings": {
"hello": "Hello",
"world": "World"
}
}
\ No newline at end of file
{
"strings": {
"hello": "您好",
"world": "世界"
}
}
\ No newline at end of file
.container {
flex-direction: column;
justify-content: center;
align-items: center;
}
.title {
font-size: 100px;
}
<div class="container">
<text class="title">
{{title}}
</text>
</div>
/*
* 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 file from '@system.file'
import {Core, ExpectExtend} from 'deccjsunit/index'
const injectRef = Object.getPrototypeOf(global) || global
injectRef.regeneratorRuntime = require('@babel/runtime/regenerator')
export default {
onInit() {
this.title = "Application account js test";
},
onShow() {
console.info('onShow finish')
const core = Core.getInstance()
const expectExtend = new ExpectExtend({
'id': 'extend'
})
core.addService('expect', expectExtend)
core.init()
const configService = core.getDefaultService('config')
configService.setConfig(this)
require('../../../test/List.test')
core.execute()
},
onReady() {
},
}
\ No newline at end of file
{
"string": [
{
"name": "app_name",
"value": "ActsAccountTest"
},
{
"name": "mainability_description",
"value": "JS_Phone_Empty Feature Ability"
}
]
}
\ No newline at end of file
/*
* 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 account from '@ohos.account.appAccount'
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
const TIMEOUT = 10000;
describe('ActsCreatAppAccountManager', function () {
function sleep(delay) {
var start = (new Date()).getTime();
while((new Date()).getTime() - start < delay) {
continue;
}
}
beforeAll(async function (done) {
console.debug("====>beforeAll start====");
sleep(TIMEOUT);
console.debug("====>beforeAll end====");
done();
});
/*
* @tc.number : ActsCreatAppAccountManager_0100
* @tc.name : createAppAccountManager
* @tc.desc : Create two application account module objects, one object adds an application account,
* the other object deletes the application account
*/
it('ActsCreatAppAccountManager_0100', 0, async function (done) {
console.debug("====>ActsCreatAppAccountManager_0100 start====");
var appAccountManager = account.createAppAccountManager();
var appAccountManagerTwo = account.createAppAccountManager();
console.debug("====>creat finish====");
appAccountManager.addAccount("creatappaccount_name_first", (err)=>{
console.debug("====>add account ActsCreatAppAccountManager_0100 err:" + JSON.stringify(err));
expect(err.code).assertEqual(0);
appAccountManagerTwo.deleteAccount("creatappaccount_name_first", (err)=>{
console.debug("====>delete Account ActsCreatAppAccountManager_0100 err:" + JSON.stringify(err));
expect(err.code).assertEqual(0);
console.debug("====>ActsCreatAppAccountManager_0100 end====");
done();
});
});
});
/*
* @tc.number : ActsCreatAppAccountManager_0200
* @tc.name : createAppAccountManager
* @tc.desc : Create two application account module objects, one object adds application accounts and
* sets additional information, and the other object can obtain additional information of
* the application account
*/
it('ActsCreatAppAccountManager_0200', 0, async function (done) {
console.debug("====>ActsCreatAppAccountManager_0200 start====");
var appAccountManager = account.createAppAccountManager();
var appAccountManagerTwo = account.createAppAccountManager();
console.debug("====>creat finish====");
appAccountManager.addAccount("creatappaccount_name_second", (err)=>{
console.debug("====>add account ActsCreatAppAccountManager_0200 err:" + JSON.stringify(err));
expect(err.code).assertEqual(0);
appAccountManagerTwo.setAccountExtraInfo("creatappaccount_name_second", "creatappaccount_extra", (err)=>{
console.debug("====>setAccountExtraInfo err:" + JSON.stringify(err));
expect(err.code).assertEqual(0);
appAccountManager.getAccountExtraInfo("creatappaccount_name_second", (err, data)=>{
console.debug("====>getAccountExtraInfo err:" + JSON.stringify(err));
console.debug("====>getAccountExtraInfo data:" + JSON.stringify(data));
expect(err.code).assertEqual(0);
expect(data).assertEqual("creatappaccount_extra");
appAccountManagerTwo.deleteAccount("creatappaccount_name_second", (err)=>{
console.debug("====>delete Account err:" + JSON.stringify(err));
expect(err.code).assertEqual(0);
console.debug("====>ActsCreatAppAccountManager_0200 end====");
done();
});
});
});
});
});
})
\ No newline at end of file
/*
* 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 account from '@ohos.account.appAccount'
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
const TIMEOUT = 10000;
const STRCOUNT = 1025;
describe('ActsAccountDeleteAccount', function () {
function sleep(delay) {
var start = (new Date()).getTime();
while((new Date()).getTime() - start < delay) {
continue;
}
}
beforeAll(async function (done) {
console.debug("====>beforeAll start====");
sleep(TIMEOUT);
console.debug("====>beforeAll end====");
done();
});
/*
* @tc.number : ActsAccountDeleteAccount_0100
* @tc.name : Delete account calllback form
* @tc.desc : Delete the added account in callback form
*/
it('ActsAccountDeleteAccount_0100', 0, async function (done) {
console.debug("====>ActsAccountDeleteAccount_0100 start====");
var appAccountManager = account.createAppAccountManager();
console.debug("====>creat finish====");
appAccountManager.addAccount("deleteAccount_name_callback_first", "extraInfo_callback_first", (err)=>{
console.debug("====>add account ActsAccountDeleteAccount_0100 err:" + JSON.stringify(err));
expect(err.code).assertEqual(0);
appAccountManager.deleteAccount("deleteAccount_name_callback_first", (err)=>{
console.debug("====>delete Account ActsAccountDeleteAccount_0100 err:" + JSON.stringify(err));
expect(err.code).assertEqual(0);
console.debug("====>ActsAccountDeleteAccount_0100 end====");
done();
});
});
});
/*
* @tc.number : ActsAccountDeleteAccount_0200
* @tc.name : Delete account calllback form
* @tc.desc : Delete unadded account in callback form
*/
it('ActsAccountDeleteAccount_0200', 0, async function (done) {
console.debug("====>ActsAccountDeleteAccount_0200 start====");
var appAccountManager = account.createAppAccountManager();
console.debug("====>creat finish====");
appAccountManager.deleteAccount("deleteAccount_name_callback_second", (err)=>{
console.debug("====>delete Account ActsAccountDeleteAccount_0200 err:" + JSON.stringify(err));
expect(err.code != 0).assertEqual(true);
console.debug("====>ActsAccountDeleteAccount_0200 end====");
done();
});
});
/*
* @tc.number : ActsAccountDeleteAccount_0300
* @tc.name : Delete account calllback form
* @tc.desc : Delete the added account, the first time it can be deleted, the second time the deletion fails
*/
it('ActsAccountDeleteAccount_0300', 0, async function (done) {
console.debug("====>ActsAccountDeleteAccount_0300 start====");
var appAccountManager = account.createAppAccountManager();
appAccountManager.addAccount("deleteAccount_name_callback_third", "extraInfo_callback_third", (err)=>{
console.debug("====>add account ActsAccountDeleteAccount_0300 err:" + JSON.stringify(err));
expect(err.code).assertEqual(0);
appAccountManager.deleteAccount("deleteAccount_name_callback_third", (err)=>{
console.debug("====>delete account first time err:" + JSON.stringify(err));
expect(err.code).assertEqual(0);
appAccountManager.deleteAccount("deleteAccount_name_callback_third", (err)=>{
console.debug("====>delete Account second time err:" + JSON.stringify(err));
expect(err.code != 0).assertEqual(true);
console.debug("====>ActsAccountDeleteAccount_0300 end====");
done();
});
});
});
});
/*
* @tc.number : ActsAccountDeleteAccount_0400
* @tc.name : Delete account calllback form
* @tc.desc : Delete the account name exceeds the length limit of 1024
*/
it('ActsAccountDeleteAccount_0400',0, async function (done){
console.debug("====>ActsAccountDeleteAccount_0400 start====");
var bigStr = '';
for (var i = 0; i < STRCOUNT; i++) {
bigStr += 't';
}
var appAccountManager = account.createAppAccountManager();
appAccountManager.deleteAccount(bigStr, (err)=>{
console.debug("====>delete Account ActsAccountDeleteAccount_0400 err:" + JSON.stringify(err));
expect(err.code != 0).assertEqual(true);
console.debug("====>ActsAccountDeleteAccount_0400 end====");
done();
});
});
/*
* @tc.number : ActsAccountDeleteAccount_0500
* @tc.name : Delete account calllback form
* @tc.desc : Delete the account name is an empty string
*/
it('ActsAccountDeleteAccount_0500',0, async function (done){
console.debug("====>ActsAccountDeleteAccount_0500 start====");
var appAccountManager = account.createAppAccountManager();
appAccountManager.deleteAccount("", (err)=>{
console.debug("====>delete Account ActsAccountDeleteAccount_0500 err:" + JSON.stringify(err));
expect(err.code != 0).assertEqual(true);
console.debug("====>ActsAccountDeleteAccount_0500 end====");
done();
});
});
/*
* @tc.number : ActsAccountDeleteAccount_0600
* @tc.name : Delete account promise form
* @tc.desc : Delete the added account in promise form
*/
it('ActsAccountDeleteAccount_0600',0,async function (done){
console.debug("====>ActsAccountDeleteAccount_0600 start====");
var appAccountManager = account.createAppAccountManager();
console.debug("====>add account ActsAccountAddAccount_0600 start====");
await appAccountManager.addAccount("deleteAccount_name_promise_first","extraInfo_promise_first");
try{
await appAccountManager.deleteAccount("deleteAccount_name_promise_first");
console.debug("====>ActsAccountDeleteAccount_0600 end====");
done();
}
catch(err){
console.error("====>delete account ActsAccountDeleteAccount_0600 err:" + JSON.stringify(err));
expect().assertFail();
done();
}
});
/*
* @tc.number : ActsAccountDeleteAccount_0700
* @tc.name : Delete account promise form
* @tc.desc : Delete unadded account in promise form
*/
it('ActsAccountDeleteAccount_0700', 0, async function(done){
console.debug("====>ActsAccountDeleteAccount_0700 start====");
var appAccountManager = account.createAppAccountManager();
try{
await appAccountManager.deleteAccount("deleteAccount_name_promise_second");
}
catch(err){
console.debug("====>delete account ActsAccountDeleteAccount_0700 err:" + JSON.stringify(err));
expect(err.code != 0).assertEqual(true);
console.debug("====>ActsAccountDeleteAccount_0700 end====");
done();
}
});
/*
* @tc.number : ActsAccountDeleteAccount_0800
* @tc.name : Delete account promise form
* @tc.desc : Delete the added account, the first time it can be deleted, the second time the deletion fails
*/
it('ActsAccountDeleteAccount_0800', 0, async function (done){
console.debug("====>ActsAccountDeleteAccount_0800 start====");
var appAccountManager = account.createAppAccountManager();
console.debug("====>add account ActsAccountAddAccount_0800 start====");
await appAccountManager.addAccount("deleteAccount_name_promise_third", "extraInfo_promise_third");
console.debug("====>delete Account first time ActsAccountDeleteAccount_0800 start====");
await appAccountManager.deleteAccount("deleteAccount_name_promise_third");
console.debug("====>delete Account second time ActsAccountDeleteAccount_0800 start====");
try{
await appAccountManager.deleteAccount("deleteAccount_name_promise_third");
}
catch(err){
console.debug("====>delete account ActsAccountDeleteAccount_0700 err:" + JSON.stringify(err));
expect(err.code != 0).assertEqual(true);
console.debug("====>ActsAccountDeleteAccount_0700 end====");
done();
}
});
/*
* @tc.number : ActsAccountDeleteAccount_0900
* @tc.name : Delete account promise form
* @tc.desc : Delete the account name exceeds the length limit of 1024
*/
it('ActsAccountDeleteAccount_0900', 0, async function (done){
console.debug("====>ActsAccountDeleteAccount_0900 start====");
var bigStr = '';
for (var i = 0; i < STRCOUNT; i++) {
bigStr += 't';
}
var appAccountManager = account.createAppAccountManager();
console.debug("====>delete Account ActsAccountDeleteAccount_0900 start====");
try{
await appAccountManager.deleteAccount(bigStr);
}
catch(err){
console.debug("====>delete account ActsAccountDeleteAccount_0900 err:" + JSON.stringify(err));
expect(err.code != 0).assertEqual(true);
console.debug("====>ActsAccountDeleteAccount_0900 end====");
done();
}
})
/*
* @tc.number : ActsAccountDeleteAccount_1000
* @tc.name : Delete account promise form
* @tc.desc : Delete the account name is an empty string
*/
it('ActsAccountDeleteAccount_1000', 0, async function (done){
console.debug("====>ActsAccountDeleteAccount_1000 start====");
var appAccountManager = account.createAppAccountManager();
console.debug("====>delete Account ActsAccountDeleteAccount_1000 start====");
try{
await appAccountManager.deleteAccount("");
}
catch(err){
console.debug("====>delete account ActsAccountDeleteAccount_1000 err:" + JSON.stringify(err));
expect(err.code != 0).assertEqual(true);
console.debug("====>ActsAccountDeleteAccount_1000 end====");
done();
}
})
})
/*
* 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.
*/
require('./AddAccount.test.js')
require('./DeleteAccount.test.js')
require('./AppAccess.test.js')
require('./ExtraInfo.test.js')
require('./AssociatedData.test.js')
require('./Credential.test.js')
require('./OAuthToken.test.js')
require('./CreatManager.test.js')
require('./NoPermission.test.js')
\ No newline at end of file
/*
* 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 account from '@ohos.account.appAccount'
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
const TIMEOUT = 10000;
const ERR_APPACCOUNT_SERVICE_PERMISSION_DENIED = 4521990;
describe('ActsAccountNoPermission', function () {
function sleep(delay) {
var start = (new Date()).getTime();
while((new Date()).getTime() - start < delay) {
continue;
}
}
beforeAll(async function (done) {
console.debug("====>beforeAll start====");
sleep(TIMEOUT);
console.debug("====>beforeAll end====");
done();
});
/*
* @tc.number : ActsAccountNoPermission_0100
* @tc.name : setAppAccountSyncEnable callback
* @tc.desc : Set the added account to allow synchronization without permission
*/
it('ActsAccountNoPermission_0100', 0, async function (done) {
console.debug("====>ActsAccountNoPermission_0100 start====");
var appAccountManager = account.createAppAccountManager();
console.debug("====>creat finish====");
appAccountManager.addAccount("syncenable_callback_setnopermission", (err)=>{
console.debug("====>add account ActsAccountNoPermission_0100 err:" + JSON.stringify(err));
expect(err.code).assertEqual(0);
appAccountManager.setAppAccountSyncEnable("syncenable_callback_setnopermission", true, (err)=>{
console.debug("====>setAppAccountSyncEnable 0100 err:" + JSON.stringify(err));
expect(err.code).assertEqual(ERR_APPACCOUNT_SERVICE_PERMISSION_DENIED);
appAccountManager.deleteAccount("syncenable_callback_setnopermission", (err)=>{
console.debug("====>delete Account ActsAccountNoPermission_0100 err:" + JSON.stringify(err));
expect(err.code).assertEqual(0);
console.debug("====>ActsAccountNoPermission_0100 end====");
done();
});
})
});
});
/*
* @tc.number : ActsAccountNoPermission_0200
* @tc.name : setAppAccountSyncEnable promise
* @tc.desc : Set the added account to allow synchronization without permission
*/
it('ActsAccountNoPermission_0200', 0, async function (done) {
console.debug("====>ActsAccountNoPermission_0200 start====");
var appAccountManager = account.createAppAccountManager();
console.debug("====>creat finish====");
console.debug("====>add account ActsAccountNoPermission_0200 start====");
await appAccountManager.addAccount("syncenable_promise_setnopermission");
console.debug("====>setAppAccountSyncEnable ActsAccountNoPermission_0200 start====");
try{
await appAccountManager.setAppAccountSyncEnable("syncenable_promise_setnopermission", true);
}
catch(err){
console.debug("====>setAppAccountSyncEnable 0200 err:" + JSON.stringify(err));
expect(err.code).assertEqual(ERR_APPACCOUNT_SERVICE_PERMISSION_DENIED);
console.debug("====>delete account ActsAccountNoPermission_0200 start====");
await appAccountManager.deleteAccount("syncenable_promise_setnopermission");
console.debug("====>ActsAccountNoPermission_0200 end====");
done();
}
});
/*
* @tc.number : ActsAccountNoPermission_0300
* @tc.name : Check sync flag callback form
* @tc.desc : Check the added account synchronization without permission
*/
it('ActsAccountNoPermission_0300', 0, async function (done) {
console.debug("====>ActsAccountNoPermission_0300 start====");
var appAccountManager = account.createAppAccountManager();
console.debug("====>creat finish====");
appAccountManager.addAccount("syncenable_callback_checknopermission", (err)=>{
console.debug("====>add account ActsAccountNoPermission_0300 err:" + JSON.stringify(err));
expect(err.code).assertEqual(0);
appAccountManager.checkAppAccountSyncEnable("syncenable_callback_checknopermission", (err, data)=>{
console.debug("====>checkAppAccountSyncEnable 0300 err:" + JSON.stringify(err));
expect(err.code).assertEqual(ERR_APPACCOUNT_SERVICE_PERMISSION_DENIED);
appAccountManager.deleteAccount("syncenable_callback_checknopermission", (err)=>{
console.debug("====>delete Account ActsAccountNoPermission_0300 err:" + JSON.stringify(err));
expect(err.code).assertEqual(0);
console.debug("====>ActsAccountNoPermission_0300 end====");
done();
});
})
});
});
/*
* @tc.number : ActsAccountNoPermission_0400
* @tc.name : Check sync flag promise form
* @tc.desc : Check the added account synchronization without permission
*/
it('ActsAccountNoPermission_0400', 0, async function (done) {
console.debug("====>ActsAccountNoPermission_0400 start====");
var appAccountManager = account.createAppAccountManager();
console.debug("====>creat finish====");
console.debug("====>add account ActsAccountNoPermission_0400 start====");
await appAccountManager.addAccount("syncenable_promise_checknopermission");
console.debug("====>checkAppAccountSyncEnable ActsAccountNoPermission_0400 start====");
try{
var data = await appAccountManager.checkAppAccountSyncEnable("syncenable_promise_checknopermission");
}
catch(err){
console.debug("====>checkAppAccountSyncEnable 0400 err:" + JSON.stringify(err));
expect(err.code).assertEqual(ERR_APPACCOUNT_SERVICE_PERMISSION_DENIED);
await appAccountManager.deleteAccount("syncenable_promise_checknopermission");
console.debug("====>ActsAccountNoPermission_0400 end====");
done();
}
});
/*
* @tc.number : ActsAccountNoPermission_0500
* @tc.name : getAllAccessibleAccounts callback
* @tc.desc : This application gets authorization after adding a single account without permission
*/
it('ActsAccountNoPermission_0500', 0, async function (done) {
console.debug("====>ActsAccountNoPermission_0500 start====");
var appAccountManager = account.createAppAccountManager();
console.debug("====>creat finish====");
appAccountManager.addAccount("accessibleAccount_callback_nopermission", (err)=>{
console.debug("====> add account ActsAccountNoPermission_0500 err:" + JSON.stringify(err));
expect(err.code).assertEqual(0);
appAccountManager.getAllAccessibleAccounts((err, data)=>{
console.debug("====>getAllAccessibleAccounts 0500 err:" + JSON.stringify(err));
expect(err.code).assertEqual(ERR_APPACCOUNT_SERVICE_PERMISSION_DENIED);
appAccountManager.deleteAccount("accessibleAccount_callback_nopermission", (err)=>{
console.debug("====>delete Account ActsAccountNoPermission_0500 err:" + JSON.stringify(err));
expect(err.code).assertEqual(0);
console.debug("====>ActsAccountNoPermission_0500 end====");
done();
})
});
});
});
/*
* @tc.number : ActsAccountNoPermission_0600
* @tc.name : getAllAccessibleAccounts promise
* @tc.desc : This application gets authorization after adding a single account without permission
*/
it('ActsAccountNoPermission_0600', 0, async function (done) {
console.debug("====>ActsAccountNoPermission_0600 start====");
var appAccountManager = account.createAppAccountManager();
console.debug("====>creat finish====");
console.debug("====>add account ActsAccountNoPermission_0600 start====");
await appAccountManager.addAccount("accessibleAccount_promise_nopermission");
console.debug("====>getAllAccessibleAccounts 0600 start====");
try{
var data = await appAccountManager.getAllAccessibleAccounts();
}
catch(err){
console.debug("====>getAllAccessibleAccounts 0600 err:" + JSON.stringify(err));
expect(err.code).assertEqual(ERR_APPACCOUNT_SERVICE_PERMISSION_DENIED);
await appAccountManager.deleteAccount("accessibleAccount_promise_nopermission");
console.debug("====>ActsAccountNoPermission_0600 end====");
done();
}
});
/*
* @tc.number : ActsAccountNoPermission_0700
* @tc.name : getAllAccounts callback
* @tc.desc : This application gets its own application information after adding an account without permission
*/
it('ActsAccountNoPermission_0700', 0, async function (done) {
console.debug("====>ActsAccountNoPermission_0700 start====");
var appAccountManager = account.createAppAccountManager();
console.debug("====>creat finish====");
var selfBundle = "com.example.actsaccountnopermission";
appAccountManager.addAccount("getAll_callback_nopermission", (err)=>{
console.debug("====>add account 0700 err:" + JSON.stringify(err));
expect(err.code).assertEqual(0);
appAccountManager.getAllAccounts(selfBundle, (err, data)=>{
console.debug("====>getAllAccounts 0700 err:" + JSON.stringify(err));
expect(err.code).assertEqual(ERR_APPACCOUNT_SERVICE_PERMISSION_DENIED);
appAccountManager.deleteAccount("getAll_callback_nopermission", (err)=>{
console.debug("====>delete account 0700 err:" + JSON.stringify(err));
expect(err.code).assertEqual(0);
console.debug("====>ActsAccountNoPermission_0700 end====");
done();
});
})
});
});
/*
* @tc.number : ActsAccountNoPermission_0800
* @tc.name : getAllAccounts promise
* @tc.desc : This application gets its own application information after adding an account without permission
*/
it('ActsAccountNoPermission_0800', 0, async function (done) {
console.debug("====>ActsAccountNoPermission_0800 start====");
var appAccountManager = account.createAppAccountManager();
console.debug("====>creat finish====");
var selfBundle = "com.example.actsaccountnopermission";
console.debug("====>add account 0800 start====");
await appAccountManager.addAccount("getAll_promise_nopermission");
console.debug("====>getAllAccounts 0800 start====");
try{
var data = await appAccountManager.getAllAccounts(selfBundle);
}
catch(err){
console.error("====>getAllAccounts 0800 err:" + JSON.stringify(err));
expect(err.code).assertEqual(ERR_APPACCOUNT_SERVICE_PERMISSION_DENIED);
await appAccountManager.deleteAccount("getAll_promise_nopermission");
console.debug("====>ActsAccountNoPermission_0800 end====");
done();
}
});
})
\ No newline at end of file
# 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("ActsGetAllAccounts") {
hap_profile = "./entry/src/main/config.json"
deps = [
":hjs_demo_js_assets",
":hjs_demo_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsGetAllAccounts"
}
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.example.actsgetallaaccounts",
"shell-timeout": "60000"
},
"kits": [
{
"test-file-name": [
"ActsGetAllAccounts.hap",
"ActsSceneGetAllAccounts.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
}
]
}
{
"app": {
"bundleName": "com.example.actsgetallaaccounts",
"vendor": "example",
"version": {
"code": 1,
"name": "1.0"
},
"apiVersion": {
"compatible": 4,
"target": 5,
"releaseType": "Beta1"
}
},
"deviceConfig": {},
"module": {
"package": "com.example.actsgetallaaccounts",
"name": ".MyApplication",
"deviceType": [
"phone"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "entry",
"moduleType": "entry"
},
"defPermissions": [
{
"availableScope": [],
"grantMode": "system_grant",
"name": "ohos.permission.GET_ACCOUNTS_PRIVILEGED"
}
],
"reqPermissions": [
{
"name": "ohos.permission.GET_ACCOUNTS_PRIVILEGED",
"reason": "ceshi"
}
],
"abilities": [
{
"skills": [
{
"entities": [
"entity.system.home"
],
"actions": [
"action.system.home"
]
}
],
"name": "com.example.actsgetallaaccounts.MainAbility",
"icon": "$media:icon",
"description": "$string:mainability_description",
"label": "$string:app_name",
"type": "page",
"visible": true,
"launchType": "standard"
}
],
"js": [
{
"pages": [
"pages/index/index"
],
"name": "default",
"window": {
"designWidth": 720,
"autoDesignWidth": false
}
}
]
}
}
\ No newline at end of file
/*
* 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.
*/
export default {
onCreate() {
console.info('AceApplication onCreate');
},
onDestroy() {
console.info('AceApplication onDestroy');
}
};
{
"strings": {
"hello": "Hello",
"world": "World"
}
}
\ No newline at end of file
{
"strings": {
"hello": "您好",
"world": "世界"
}
}
\ No newline at end of file
.container {
flex-direction: column;
justify-content: center;
align-items: center;
}
.title {
font-size: 100px;
}
<div class="container">
<text class="title">
{{title}}
</text>
</div>
/*
* 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 file from '@system.file'
import {Core, ExpectExtend} from 'deccjsunit/index'
const injectRef = Object.getPrototypeOf(global) || global
injectRef.regeneratorRuntime = require('@babel/runtime/regenerator')
export default {
data: {
title: "测试getAllAccounts接口"
},
onInit() {
this.title = "测试getAllAccounts接口";
},
onShow() {
console.info('onShow finish')
const core = Core.getInstance()
const expectExtend = new ExpectExtend({
'id': 'extend'
})
core.addService('expect', expectExtend)
core.init()
const configService = core.getDefaultService('config')
configService.setConfig(this)
require('../../../test/List.test')
core.execute()
},
onReady() {
},
}
\ No newline at end of file
{
"string": [
{
"name": "app_name",
"value": "ActsGetAllAccounts"
},
{
"name": "mainability_description",
"value": "JS_Phone_Empty Feature Ability"
}
]
}
\ No newline at end of file
/*
* 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.
*/
require('./ExampleJsunit.test.js')
\ No newline at end of file
# 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("ActsSetCheckSyncEnable") {
hap_profile = "./entry/src/main/config.json"
deps = [
":hjs_demo_js_assets",
":hjs_demo_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsSetCheckSyncEnable"
}
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.example.actssetchecksyncenable",
"shell-timeout": "60000"
},
"kits": [
{
"test-file-name": [
"ActsSetCheckSyncEnable.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
}
]
}
{
"app": {
"bundleName": "com.example.actssetchecksyncenable",
"vendor": "example",
"version": {
"code": 1,
"name": "1.0"
},
"apiVersion": {
"compatible": 4,
"target": 5,
"releaseType": "Beta1"
}
},
"deviceConfig": {},
"module": {
"package": "com.example.actssetchecksyncenable",
"name": ".MyApplication",
"deviceType": [
"phone"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "entry",
"moduleType": "entry"
},
"defPermissions": [
{
"availableScope": [],
"grantMode": "system_grant",
"name": "ohos.permission.DISTRIBUTED_DATASYNC"
}
],
"reqPermissions": [
{
"name": "ohos.permission.DISTRIBUTED_DATASYNC",
"reason": "ceshi"
}
],
"abilities": [
{
"skills": [
{
"entities": [
"entity.system.home"
],
"actions": [
"action.system.home"
]
}
],
"name": "com.example.actssetchecksyncenable.MainAbility",
"icon": "$media:icon",
"description": "$string:mainability_description",
"label": "$string:app_name",
"type": "page",
"visible": true,
"launchType": "standard"
}
],
"js": [
{
"pages": [
"pages/index/index"
],
"name": "default",
"window": {
"designWidth": 720,
"autoDesignWidth": false
}
}
]
}
}
\ No newline at end of file
/*
* 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.
*/
export default {
onCreate() {
console.info('AceApplication onCreate');
},
onDestroy() {
console.info('AceApplication onDestroy');
}
};
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册