Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
8c867866
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
8c867866
编写于
2月 14, 2022
作者:
O
openharmony_ci
提交者:
Gitee
2月 14, 2022
浏览文件
操作
浏览文件
下载
差异文件
!1887 Change signture and add limit test
Merge pull request !1887 from 高曦/master_account_0211
上级
13985dad
9dc0c5c3
变更
13
展开全部
隐藏空白更改
内联
并排
Showing
13 changed file
with
661 addition
and
33 deletion
+661
-33
account/osaccount/actsosaccountsystemtest/entry/src/main/js/default/pages/index/index.js
...systemtest/entry/src/main/js/default/pages/index/index.js
+1
-1
account/osaccount/actsosaccountsystemtest/entry/src/main/js/test/Activate.test.js
...accountsystemtest/entry/src/main/js/test/Activate.test.js
+1
-2
account/osaccount/actsosaccountsystemtest/entry/src/main/js/test/Create.test.js
...osaccountsystemtest/entry/src/main/js/test/Create.test.js
+5
-4
account/osaccount/actsosaccountsystemtest/entry/src/main/js/test/Limit.test.js
...sosaccountsystemtest/entry/src/main/js/test/Limit.test.js
+627
-0
account/osaccount/actsosaccountsystemtest/entry/src/main/js/test/List.test.js
...tsosaccountsystemtest/entry/src/main/js/test/List.test.js
+2
-1
account/osaccount/actsosaccountsystemtest/entry/src/main/js/test/Photo.test.js
...sosaccountsystemtest/entry/src/main/js/test/Photo.test.js
+1
-1
account/osaccount/actsosaccountsystemtest/entry/src/main/js/test/Query.test.js
...sosaccountsystemtest/entry/src/main/js/test/Query.test.js
+8
-8
account/osaccount/actsosaccountsystemtest/entry/src/main/js/test/Set.test.js
...ctsosaccountsystemtest/entry/src/main/js/test/Set.test.js
+2
-2
account/osaccount/actsosaccountsystemtest/signature/openharmony_sx.p7b
...ount/actsosaccountsystemtest/signature/openharmony_sx.p7b
+0
-0
account/osaccount/actsosaccountthirdpartytest/entry/src/main/js/default/pages/index/index.js
...dpartytest/entry/src/main/js/default/pages/index/index.js
+1
-1
account/osaccount/actsosaccountthirdpartytest/entry/src/main/js/test/OsAccountGet.test.js
...hirdpartytest/entry/src/main/js/test/OsAccountGet.test.js
+9
-9
account/osaccount/actsosaccountthirdpartytest/entry/src/main/js/test/OsAccountIs.test.js
...thirdpartytest/entry/src/main/js/test/OsAccountIs.test.js
+4
-4
account/osaccount/actsosaccountthirdpartytest/signature/openharmony_sx.p7b
.../actsosaccountthirdpartytest/signature/openharmony_sx.p7b
+0
-0
未找到文件。
account/osaccount/actsosaccountsystemtest/entry/src/main/js/default/pages/index/index.js
浏览文件 @
8c867866
...
...
@@ -35,7 +35,7 @@ export default {
core
.
init
()
const
configService
=
core
.
getDefaultService
(
'
config
'
)
this
.
timeout
=
8
000
;
this
.
timeout
=
30
000
;
configService
.
setConfig
(
this
)
require
(
'
../../../test/List.test
'
)
...
...
account/osaccount/actsosaccountsystemtest/entry/src/main/js/test/Activate.test.js
浏览文件 @
8c867866
...
...
@@ -16,7 +16,7 @@ import osaccount from '@ohos.account.osAccount'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
const
TIMEOUT
=
1000
;
const
ERR_OSACCOUNT_KIT_ACTIVATE_OS_ACCOUNT_ERROR
=
458757
4
;
const
ERR_OSACCOUNT_KIT_ACTIVATE_OS_ACCOUNT_ERROR
=
458757
1
;
describe
(
'
ActsOsAccountSystemTest
'
,
function
()
{
/*
...
...
@@ -161,7 +161,6 @@ describe('ActsOsAccountSystemTest', function () {
var
isActiveHandred
=
await
osAccountManager
.
isOsAccountActived
(
100
);
console
.
debug
(
"
====>localId: 100 isOsAccountActived:
"
+
isActiveHandred
);
expect
(
isActiveHandred
).
assertFalse
();
await
osAccountManager
.
activateOsAccount
(
100
);
await
osAccountManager
.
removeOsAccount
(
osLocalId
);
console
.
debug
(
"
====>ActsOsAccountActivate_0400 end====
"
);
done
();
...
...
account/osaccount/actsosaccountsystemtest/entry/src/main/js/test/Create.test.js
浏览文件 @
8c867866
...
...
@@ -15,10 +15,10 @@
import
osaccount
from
'
@ohos.account.osaccount
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
const
ERR_OS_ACCOUNT_KIT_CREATE_OS_ACCOUNT_ERROR
=
458752
6
;
const
ERR_OSACCOUNT_KIT_REMOVE_OSACCOUNT_ERROR
=
45875
32
;
const
ERR_OSACCOUNT_KIT_LOCAL_NAME_EMPTY_ERROR
=
45875
81
;
const
ERR_OSACCOUNT_KIT_CANNOT_DELETE_ID_ERROR
=
458758
4
;
const
ERR_OS_ACCOUNT_KIT_CREATE_OS_ACCOUNT_ERROR
=
458752
3
;
const
ERR_OSACCOUNT_KIT_REMOVE_OSACCOUNT_ERROR
=
45875
29
;
const
ERR_OSACCOUNT_KIT_LOCAL_NAME_EMPTY_ERROR
=
45875
78
;
const
ERR_OSACCOUNT_KIT_CANNOT_DELETE_ID_ERROR
=
458758
1
;
describe
(
'
ActsOsAccountSystemTest
'
,
function
()
{
/*
...
...
@@ -605,6 +605,7 @@ describe('ActsOsAccountSystemTest', function () {
console
.
debug
(
"
====>second createOsAccount OsAccountInfo:
"
+
JSON
.
stringify
(
accountInfoSec
));
var
localIdSec
=
accountInfoSec
.
localId
;
var
serialNumSec
=
accountInfoSec
.
serialNumber
;
await
osAccountManager
.
removeOsAccount
(
localIdSec
);
console
.
debug
(
"
====>first create localId:
"
+
localIdFir
+
"
second create localId:
"
+
localIdSec
);
console
.
debug
(
"
====>first create serialNumber:
"
+
serialNumFir
+
"
second serialNumber:
"
+
serialNumSec
);
expect
(
localIdFir
).
assertEqual
(
localIdSec
);
...
...
account/osaccount/actsosaccountsystemtest/entry/src/main/js/test/Limit.test.js
0 → 100755
浏览文件 @
8c867866
此差异已折叠。
点击以展开。
account/osaccount/actsosaccountsystemtest/entry/src/main/js/test/List.test.js
浏览文件 @
8c867866
...
...
@@ -18,4 +18,5 @@ require('./OnOff.test.js')
require
(
'
./Set.test.js
'
)
require
(
'
./Constraints.test.js
'
)
require
(
'
./Photo.test.js
'
)
require
(
'
./Create.test.js
'
)
\ No newline at end of file
require
(
'
./Create.test.js
'
)
require
(
'
./Limit.test.js
'
)
\ No newline at end of file
account/osaccount/actsosaccountsystemtest/entry/src/main/js/test/Photo.test.js
浏览文件 @
8c867866
...
...
@@ -16,7 +16,7 @@ import osaccount from '@ohos.account.osaccount'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
const
TIMEOUT
=
1000
;
const
ERR_OSACCOUNT_KIT_GET_OS_ACCOUNT_PROFILE_PHOTO_ERROR
=
458755
8
;
const
ERR_OSACCOUNT_KIT_GET_OS_ACCOUNT_PROFILE_PHOTO_ERROR
=
458755
5
;
describe
(
'
ActsOsAccountSystemTest
'
,
function
()
{
/*
...
...
account/osaccount/actsosaccountsystemtest/entry/src/main/js/test/Query.test.js
浏览文件 @
8c867866
...
...
@@ -17,7 +17,7 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '
const
TIMEOUT
=
1000
;
const
OSACCOUNTMAXNUMBER
=
999
;
const
ERR_OSACCOUNT_KIT_QUERY_OS_ACCOUNT_BY_ID_ERROR
=
458755
6
;
const
ERR_OSACCOUNT_KIT_QUERY_OS_ACCOUNT_BY_ID_ERROR
=
458755
3
;
describe
(
'
ActsOsAccountSystemTest
'
,
function
()
{
/*
...
...
@@ -377,7 +377,7 @@ describe('ActsOsAccountSystemTest', function () {
/*
* @tc.number : ActsOsAccountQuery_1600
* @tc.name : queryMaxOsAccountNumber
callback
* @tc.name : queryMaxOsAccountNumber
promise
* @tc.desc : Query the maximum number of users that can be created on the device
*/
it
(
'
ActsOsAccountQuery_1600
'
,
0
,
async
function
(
done
)
{
...
...
@@ -404,12 +404,12 @@ describe('ActsOsAccountSystemTest', function () {
console
.
debug
(
"
====>queryCurrentOsAccount err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>queryCurrentOsAccount data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
data
.
localId
).
assertEqual
(
0
);
expect
(
data
.
localId
).
assertEqual
(
10
0
);
expect
(
data
.
type
.
ADMIN
).
assertEqual
(
0
);
var
serialNumberStr
=
data
.
serialNumber
.
toString
();
var
serialIntercept
=
serialNumberStr
.
substring
(
8
);
console
.
debug
(
"
====>truncate the last eight characters:
"
+
serialIntercept
);
expect
(
serialIntercept
).
assertEqual
(
"
0000000
0
"
);
expect
(
serialIntercept
).
assertEqual
(
"
0000000
1
"
);
expect
(
data
.
isCreateCompleted
).
assertTrue
();
console
.
debug
(
"
====>ActsOsAccountQuery_1700 end====
"
);
done
();
...
...
@@ -427,12 +427,12 @@ describe('ActsOsAccountSystemTest', function () {
console
.
debug
(
"
====>get os AccountManager finish====
"
);
var
data
=
await
AccountManager
.
queryCurrentOsAccount
();
console
.
debug
(
"
====>queryCurrentOsAccount data:
"
+
JSON
.
stringify
(
data
));
expect
(
data
.
localId
).
assertEqual
(
0
);
expect
(
data
.
localId
).
assertEqual
(
10
0
);
expect
(
data
.
type
.
ADMIN
).
assertEqual
(
0
);
var
serialNumberStr
=
data
.
serialNumber
.
toString
();
var
serialIntercept
=
serialNumberStr
.
substring
(
8
);
console
.
debug
(
"
====>truncate the last eight characters:
"
+
serialIntercept
);
expect
(
serialIntercept
).
assertEqual
(
"
0000000
0
"
);
expect
(
serialIntercept
).
assertEqual
(
"
0000000
1
"
);
expect
(
data
.
isCreateCompleted
).
assertTrue
();
console
.
debug
(
"
====>ActsOsAccountQuery_1800 end====
"
);
done
();
...
...
@@ -462,7 +462,7 @@ describe('ActsOsAccountSystemTest', function () {
console
.
debug
(
"
====>queryCurrentOsAccount err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>queryCurrentOsAccount data:
"
+
JSON
.
stringify
(
currentOsInfo
));
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
currentOsInfo
.
localId
).
assertEqual
(
0
);
expect
(
currentOsInfo
.
localId
).
assertEqual
(
10
0
);
AccountManager
.
removeOsAccount
(
createLocalId
,
(
err
)
=>
{
console
.
debug
(
"
====>remove localId:
"
+
createLocalId
+
"
err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
).
assertEqual
(
0
);
...
...
@@ -491,7 +491,7 @@ describe('ActsOsAccountSystemTest', function () {
await
AccountManager
.
activateOsAccount
(
createLocalId
);
var
currentOsInfo
=
await
AccountManager
.
queryCurrentOsAccount
();
console
.
debug
(
"
====>queryCurrentOsAccount:
"
+
JSON
.
stringify
(
currentOsInfo
));
expect
(
currentOsInfo
.
localId
).
assertEqual
(
0
);
expect
(
currentOsInfo
.
localId
).
assertEqual
(
10
0
);
await
AccountManager
.
removeOsAccount
(
createLocalId
);
console
.
debug
(
"
====>ActsOsAccountQuery_2000 end====
"
);
done
();
...
...
account/osaccount/actsosaccountsystemtest/entry/src/main/js/test/Set.test.js
浏览文件 @
8c867866
...
...
@@ -16,8 +16,8 @@ import osAccount from '@ohos.account.osAccount'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
const
TIMEOUT
=
1000
;
const
ERR_OSACCOUNT_KIT_SET_OS_ACCOUNT_NAME_ERROR
=
458756
4
;
const
ERR_OSACCOUNT_KIT_SET_OS_ACCOUNT_PROFILE_PHOTO_ERROR
=
458756
6
;
const
ERR_OSACCOUNT_KIT_SET_OS_ACCOUNT_NAME_ERROR
=
458756
1
;
const
ERR_OSACCOUNT_KIT_SET_OS_ACCOUNT_PROFILE_PHOTO_ERROR
=
458756
3
;
describe
(
'
ActsOsAccountSystemTest
'
,
function
()
{
/*
...
...
account/osaccount/actsosaccountsystemtest/signature/openharmony_sx.p7b
浏览文件 @
8c867866
无法预览此类型文件
account/osaccount/actsosaccountthirdpartytest/entry/src/main/js/default/pages/index/index.js
浏览文件 @
8c867866
...
...
@@ -35,7 +35,7 @@ export default {
core
.
init
()
const
configService
=
core
.
getDefaultService
(
'
config
'
)
this
.
timeout
=
8
000
;
this
.
timeout
=
15
000
;
configService
.
setConfig
(
this
)
require
(
'
../../../test/List.test
'
)
...
...
account/osaccount/actsosaccountthirdpartytest/entry/src/main/js/test/OsAccountGet.test.js
浏览文件 @
8c867866
...
...
@@ -16,7 +16,7 @@ import osaccount from '@ohos.account.osAccount'
import
bundle
from
'
@ohos.bundle
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
const
ERR_OS
ACCOUNT_KIT_GET_OS_ACCOUNT_LOCAL_ID_FROM_UID_ERROR
=
4587551
;
const
ERR_OS
_ACCOUNT_SERVICE_MANAGER_BAD_UID_ERR
=
4653057
;
describe
(
'
ActsOsAccountThirdPartyTest
'
,
function
()
{
/*
...
...
@@ -36,7 +36,7 @@ describe('ActsOsAccountThirdPartyTest', function () {
console
.
debug
(
"
====>get localId err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>localId obtained by uid:
"
+
localId
);
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
localId
).
assertEqual
(
0
);
expect
(
localId
).
assertEqual
(
10
0
);
console
.
debug
(
"
====>ActsOsAccountGetIdFormUid_0100 end====
"
);
done
();
});
...
...
@@ -57,7 +57,7 @@ describe('ActsOsAccountThirdPartyTest', function () {
console
.
debug
(
"
====>obtained uid:
"
+
uid
);
var
localId
=
await
osAccountManager
.
getOsAccountLocalIdFromUid
(
uid
);
console
.
debug
(
"
====>localId obtained by uid:
"
+
localId
);
expect
(
localId
).
assertEqual
(
0
);
expect
(
localId
).
assertEqual
(
10
0
);
console
.
debug
(
"
====>ActsOsAccountGetIdFormUid_0200 end====
"
);
done
();
});
...
...
@@ -75,7 +75,7 @@ describe('ActsOsAccountThirdPartyTest', function () {
osAccountManager
.
getOsAccountLocalIdFromUid
(
incorrectUid
,
(
err
,
localId
)
=>
{
console
.
debug
(
"
====>get localId err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>localId obtained by uid:
"
+
localId
);
expect
(
err
.
code
).
assertEqual
(
ERR_OS
ACCOUNT_KIT_GET_OS_ACCOUNT_LOCAL_ID_FROM_UID_ERRO
R
);
expect
(
err
.
code
).
assertEqual
(
ERR_OS
_ACCOUNT_SERVICE_MANAGER_BAD_UID_ER
R
);
expect
(
localId
).
assertEqual
(
0
);
console
.
debug
(
"
====>ActsOsAccountGetIdFormUid_0300 end====
"
);
done
();
...
...
@@ -96,7 +96,7 @@ describe('ActsOsAccountThirdPartyTest', function () {
await
osAccountManager
.
getOsAccountLocalIdFromUid
(
incorrectUid
);
}
catch
(
err
){
console
.
debug
(
"
====>get localId by uid err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
).
assertEqual
(
ERR_OS
ACCOUNT_KIT_GET_OS_ACCOUNT_LOCAL_ID_FROM_UID_ERRO
R
);
expect
(
err
.
code
).
assertEqual
(
ERR_OS
_ACCOUNT_SERVICE_MANAGER_BAD_UID_ER
R
);
console
.
debug
(
"
====>ActsOsAccountGetIdFormUid_0400 end====
"
);
done
();
}
...
...
@@ -115,7 +115,7 @@ describe('ActsOsAccountThirdPartyTest', function () {
osAccountManager
.
getOsAccountLocalIdFromUid
(
incorrectUid
,
(
err
,
localId
)
=>
{
console
.
debug
(
"
====>get localId err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>localId obtained by uid:
"
+
localId
);
expect
(
err
.
code
).
assertEqual
(
ERR_OS
ACCOUNT_KIT_GET_OS_ACCOUNT_LOCAL_ID_FROM_UID_ERRO
R
);
expect
(
err
.
code
).
assertEqual
(
ERR_OS
_ACCOUNT_SERVICE_MANAGER_BAD_UID_ER
R
);
expect
(
localId
).
assertEqual
(
0
);
console
.
debug
(
"
====>ActsOsAccountGetIdFormUid_0500 end====
"
);
done
();
...
...
@@ -136,7 +136,7 @@ describe('ActsOsAccountThirdPartyTest', function () {
await
osAccountManager
.
getOsAccountLocalIdFromUid
(
incorrectUid
);
}
catch
(
err
){
console
.
debug
(
"
====>get localId by uid err:
"
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
).
assertEqual
(
ERR_OS
ACCOUNT_KIT_GET_OS_ACCOUNT_LOCAL_ID_FROM_UID_ERRO
R
);
expect
(
err
.
code
).
assertEqual
(
ERR_OS
_ACCOUNT_SERVICE_MANAGER_BAD_UID_ER
R
);
console
.
debug
(
"
====>ActsOsAccountGetIdFormUid_0600 end====
"
);
done
();
}
...
...
@@ -155,7 +155,7 @@ describe('ActsOsAccountThirdPartyTest', function () {
console
.
debug
(
"
====>get localId err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>localId obtained by process:
"
+
localId
);
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
localId
).
assertEqual
(
0
);
expect
(
localId
).
assertEqual
(
10
0
);
console
.
debug
(
"
====>ActsOsAccountGetIdFormProcess_0100 end====
"
);
done
();
});
...
...
@@ -172,7 +172,7 @@ describe('ActsOsAccountThirdPartyTest', function () {
console
.
debug
(
"
====>get AccountManager finish====
"
);
var
localId
=
await
osAccountManager
.
getOsAccountLocalIdFromProcess
();
console
.
debug
(
"
====>localId obtained by process:
"
+
localId
);
expect
(
localId
).
assertEqual
(
0
);
expect
(
localId
).
assertEqual
(
10
0
);
console
.
debug
(
"
====>ActsOsAccountGetIdFormProcess_0200 end====
"
);
done
();
});
...
...
account/osaccount/actsosaccountthirdpartytest/entry/src/main/js/test/OsAccountIs.test.js
浏览文件 @
8c867866
...
...
@@ -16,8 +16,8 @@ import osAccount from '@ohos.account.osAccount'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
const
TIMEOUT
=
1000
;
const
ERR_OSACCOUNT_KIT_IS_OS_ACCOUNT_ACTIVED_ERROR
=
458754
5
;
const
ERR_OSACCOUNT_KIT_IS_OS_ACCOUNT_VERIFIED_ERROR
=
458754
8
;
const
ERR_OSACCOUNT_KIT_IS_OS_ACCOUNT_ACTIVED_ERROR
=
458754
2
;
const
ERR_OSACCOUNT_KIT_IS_OS_ACCOUNT_VERIFIED_ERROR
=
458754
5
;
describe
(
'
ActsOsAccountThirdPartyTest
'
,
function
()
{
/*
...
...
@@ -33,7 +33,7 @@ describe('ActsOsAccountThirdPartyTest', function () {
console
.
debug
(
"
====>getDistributedVirtualDeviceId err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>getDistributedVirtualDeviceId deviceId:
"
+
deviceId
);
expect
(
err
.
code
).
assertEqual
(
0
);
expect
(
deviceId
).
assertEqual
(
"
0
"
);
expect
(
deviceId
).
assertEqual
(
""
);
console
.
debug
(
"
====>ActsOsAccountDeviceId_0100 end====
"
);
done
();
})
...
...
@@ -57,7 +57,7 @@ describe('ActsOsAccountThirdPartyTest', function () {
done
();
}
console
.
debug
(
"
====>getDistributedVirtualDeviceId:
"
+
deviceId
);
expect
(
deviceId
).
assertEqual
(
"
0
"
);
expect
(
deviceId
).
assertEqual
(
""
);
console
.
debug
(
"
====>ActsOsAccountDeviceId_0200 end====
"
);
done
();
})
...
...
account/osaccount/actsosaccountthirdpartytest/signature/openharmony_sx.p7b
100644 → 100755
浏览文件 @
8c867866
无法预览此类型文件
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录