Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
4303d0b5
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看板
未验证
提交
4303d0b5
编写于
8月 04, 2022
作者:
O
openharmony_ci
提交者:
Gitee
8月 04, 2022
浏览文件
操作
浏览文件
下载
差异文件
!4796 【账号】修改测试用例中硬编码问题
Merge pull request !4796 from 何海涛/0804HardCode
上级
cff69170
51a5fb77
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
21 addition
and
7 deletion
+21
-7
account/osaccount/actsosaccountthirdpartytest/src/main/js/test/OsAccountGet.test.js
...countthirdpartytest/src/main/js/test/OsAccountGet.test.js
+21
-7
未找到文件。
account/osaccount/actsosaccountthirdpartytest/src/main/js/test/OsAccountGet.test.js
浏览文件 @
4303d0b5
...
@@ -28,6 +28,8 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
...
@@ -28,6 +28,8 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
it
(
'
ActsOsAccountGetIdFormUid_0100
'
,
0
,
async
function
(
done
)
{
it
(
'
ActsOsAccountGetIdFormUid_0100
'
,
0
,
async
function
(
done
)
{
console
.
debug
(
"
====>ActsOsAccountGetIdFormUid_0100 start====
"
);
console
.
debug
(
"
====>ActsOsAccountGetIdFormUid_0100 start====
"
);
var
osAccountManager
=
osaccount
.
getAccountManager
();
var
osAccountManager
=
osaccount
.
getAccountManager
();
var
testLocalId
=
await
osAccountManager
.
getOsAccountLocalIdFromProcess
();
console
.
debug
(
"
====>testLocalId:
"
+
testLocalId
)
console
.
debug
(
"
====>get AccountManager finish====
"
);
console
.
debug
(
"
====>get AccountManager finish====
"
);
var
bundleName
=
"
com.example.actsosaccountthirdpartytest
"
;
var
bundleName
=
"
com.example.actsosaccountthirdpartytest
"
;
var
bundleInfo
=
await
bundle
.
getBundleInfo
(
bundleName
,
bundle
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
);
var
bundleInfo
=
await
bundle
.
getBundleInfo
(
bundleName
,
bundle
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
);
...
@@ -37,7 +39,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
...
@@ -37,7 +39,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
console
.
debug
(
"
====>get localId err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>get localId err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>localId obtained by uid:
"
+
localId
);
console
.
debug
(
"
====>localId obtained by uid:
"
+
localId
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
localId
).
assertEqual
(
100
);
expect
(
localId
).
assertEqual
(
testLocalId
);
console
.
debug
(
"
====>ActsOsAccountGetIdFormUid_0100 end====
"
);
console
.
debug
(
"
====>ActsOsAccountGetIdFormUid_0100 end====
"
);
done
();
done
();
});
});
...
@@ -51,6 +53,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
...
@@ -51,6 +53,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
it
(
'
ActsOsAccountGetIdFormUid_0200
'
,
0
,
async
function
(
done
)
{
it
(
'
ActsOsAccountGetIdFormUid_0200
'
,
0
,
async
function
(
done
)
{
console
.
debug
(
"
====>ActsOsAccountGetIdFormUid_0200 start====
"
);
console
.
debug
(
"
====>ActsOsAccountGetIdFormUid_0200 start====
"
);
var
osAccountManager
=
osaccount
.
getAccountManager
();
var
osAccountManager
=
osaccount
.
getAccountManager
();
var
testLocalId
=
await
osAccountManager
.
getOsAccountLocalIdFromProcess
();
console
.
debug
(
"
====>get AccountManager finish====
"
);
console
.
debug
(
"
====>get AccountManager finish====
"
);
var
bundleName
=
"
com.example.actsosaccountthirdpartytest
"
;
var
bundleName
=
"
com.example.actsosaccountthirdpartytest
"
;
var
bundleInfo
=
await
bundle
.
getBundleInfo
(
bundleName
,
bundle
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
);
var
bundleInfo
=
await
bundle
.
getBundleInfo
(
bundleName
,
bundle
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
);
...
@@ -58,7 +61,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
...
@@ -58,7 +61,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
console
.
debug
(
"
====>obtained uid:
"
+
uid
);
console
.
debug
(
"
====>obtained uid:
"
+
uid
);
var
localId
=
await
osAccountManager
.
getOsAccountLocalIdFromUid
(
uid
);
var
localId
=
await
osAccountManager
.
getOsAccountLocalIdFromUid
(
uid
);
console
.
debug
(
"
====>localId obtained by uid:
"
+
localId
);
console
.
debug
(
"
====>localId obtained by uid:
"
+
localId
);
expect
(
localId
).
assertEqual
(
100
);
expect
(
localId
).
assertEqual
(
testLocalId
);
console
.
debug
(
"
====>ActsOsAccountGetIdFormUid_0200 end====
"
);
console
.
debug
(
"
====>ActsOsAccountGetIdFormUid_0200 end====
"
);
done
();
done
();
});
});
...
@@ -151,12 +154,16 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
...
@@ -151,12 +154,16 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
it
(
'
ActsOsAccountGetIdFormProcess_0100
'
,
0
,
async
function
(
done
)
{
it
(
'
ActsOsAccountGetIdFormProcess_0100
'
,
0
,
async
function
(
done
)
{
console
.
debug
(
"
====>ActsOsAccountGetIdFormProcess_0100 start====
"
);
console
.
debug
(
"
====>ActsOsAccountGetIdFormProcess_0100 start====
"
);
var
osAccountManager
=
osaccount
.
getAccountManager
();
var
osAccountManager
=
osaccount
.
getAccountManager
();
var
bundleName
=
"
com.example.actsosaccountthirdpartytest
"
;
var
bundleInfo
=
await
bundle
.
getBundleInfo
(
bundleName
,
bundle
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
);
var
uid
=
bundleInfo
.
uid
;
var
testLocalId
=
await
osAccountManager
.
getOsAccountLocalIdFromUid
(
uid
)
console
.
debug
(
"
====>get AccountManager finish====
"
);
console
.
debug
(
"
====>get AccountManager finish====
"
);
osAccountManager
.
getOsAccountLocalIdFromProcess
((
err
,
localId
)
=>
{
osAccountManager
.
getOsAccountLocalIdFromProcess
((
err
,
localId
)
=>
{
console
.
debug
(
"
====>get localId err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>get localId err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>localId obtained by process:
"
+
localId
);
console
.
debug
(
"
====>localId obtained by process:
"
+
localId
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
localId
).
assertEqual
(
100
);
expect
(
localId
).
assertEqual
(
testLocalId
);
console
.
debug
(
"
====>ActsOsAccountGetIdFormProcess_0100 end====
"
);
console
.
debug
(
"
====>ActsOsAccountGetIdFormProcess_0100 end====
"
);
done
();
done
();
});
});
...
@@ -170,10 +177,15 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
...
@@ -170,10 +177,15 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
it
(
'
ActsOsAccountGetIdFormProcess_0200
'
,
0
,
async
function
(
done
)
{
it
(
'
ActsOsAccountGetIdFormProcess_0200
'
,
0
,
async
function
(
done
)
{
console
.
debug
(
"
====>ActsOsAccountGetIdFormProcess_0200 start====
"
);
console
.
debug
(
"
====>ActsOsAccountGetIdFormProcess_0200 start====
"
);
var
osAccountManager
=
osaccount
.
getAccountManager
();
var
osAccountManager
=
osaccount
.
getAccountManager
();
var
bundleName
=
"
com.example.actsosaccountthirdpartytest
"
;
var
bundleInfo
=
await
bundle
.
getBundleInfo
(
bundleName
,
bundle
.
BundleFlag
.
GET_BUNDLE_WITH_ABILITIES
);
var
uid
=
bundleInfo
.
uid
;
var
testLocalId
=
await
osAccountManager
.
getOsAccountLocalIdFromUid
(
uid
)
console
.
debug
(
"
====>testLocalId obtained by process:
"
+
testLocalId
)
console
.
debug
(
"
====>get AccountManager finish====
"
);
console
.
debug
(
"
====>get AccountManager finish====
"
);
var
localId
=
await
osAccountManager
.
getOsAccountLocalIdFromProcess
();
var
localId
=
await
osAccountManager
.
getOsAccountLocalIdFromProcess
();
console
.
debug
(
"
====>localId obtained by process:
"
+
localId
);
console
.
debug
(
"
====>localId obtained by process:
"
+
localId
);
expect
(
localId
).
assertEqual
(
100
);
expect
(
localId
).
assertEqual
(
testLocalId
);
console
.
debug
(
"
====>ActsOsAccountGetIdFormProcess_0200 end====
"
);
console
.
debug
(
"
====>ActsOsAccountGetIdFormProcess_0200 end====
"
);
done
();
done
();
});
});
...
@@ -221,6 +233,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
...
@@ -221,6 +233,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
it
(
'
ActsOsAccountLocalIdSerial_0100
'
,
0
,
async
function
(
done
)
{
it
(
'
ActsOsAccountLocalIdSerial_0100
'
,
0
,
async
function
(
done
)
{
console
.
debug
(
"
====>ActsOsAccountLocalIdSerial_0100 start====
"
);
console
.
debug
(
"
====>ActsOsAccountLocalIdSerial_0100 start====
"
);
var
osAccountManager
=
osaccount
.
getAccountManager
();
var
osAccountManager
=
osaccount
.
getAccountManager
();
var
testLocalId
=
await
osAccountManager
.
getOsAccountLocalIdFromProcess
();
console
.
debug
(
"
====>get AccountManager finish====
"
);
console
.
debug
(
"
====>get AccountManager finish====
"
);
osAccountManager
.
getSerialNumberByOsAccountLocalId
(
100
,
(
err
,
serialNumber
)
=>
{
osAccountManager
.
getSerialNumberByOsAccountLocalId
(
100
,
(
err
,
serialNumber
)
=>
{
console
.
debug
(
"
====>ger serialNumber err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ger serialNumber err:
"
+
JSON
.
stringify
(
err
));
...
@@ -234,7 +247,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
...
@@ -234,7 +247,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
console
.
debug
(
"
====>ger localId err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>ger localId err:
"
+
JSON
.
stringify
(
err
));
console
.
debug
(
"
====>get localId:
"
+
localId
+
"
by serialNumber:
"
+
serialNumber
);
console
.
debug
(
"
====>get localId:
"
+
localId
+
"
by serialNumber:
"
+
serialNumber
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
err
).
assertEqual
(
undefined
);
expect
(
localId
).
assertEqual
(
100
);
expect
(
localId
).
assertEqual
(
testLocalId
);
console
.
debug
(
"
====>ActsOsAccountLocalIdSerial_0100 end====
"
);
console
.
debug
(
"
====>ActsOsAccountLocalIdSerial_0100 end====
"
);
done
();
done
();
})
})
...
@@ -249,8 +262,9 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
...
@@ -249,8 +262,9 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
it
(
'
ActsOsAccountLocalIdSerial_0200
'
,
0
,
async
function
(
done
)
{
it
(
'
ActsOsAccountLocalIdSerial_0200
'
,
0
,
async
function
(
done
)
{
console
.
debug
(
"
====>ActsOsAccountLocalIdSerial_0200 start====
"
);
console
.
debug
(
"
====>ActsOsAccountLocalIdSerial_0200 start====
"
);
var
osAccountManager
=
osaccount
.
getAccountManager
();
var
osAccountManager
=
osaccount
.
getAccountManager
();
var
testLocalId
=
await
osAccountManager
.
getOsAccountLocalIdFromProcess
();
console
.
debug
(
"
====>get AccountManager finish====
"
);
console
.
debug
(
"
====>get AccountManager finish====
"
);
var
serialNumber
=
await
osAccountManager
.
getSerialNumberByOsAccountLocalId
(
100
);
var
serialNumber
=
await
osAccountManager
.
getSerialNumberByOsAccountLocalId
(
testLocalId
);
console
.
debug
(
"
====>get serialNumber:
"
+
serialNumber
+
"
by localId: 100
"
);
console
.
debug
(
"
====>get serialNumber:
"
+
serialNumber
+
"
by localId: 100
"
);
var
serialNumberStr
=
serialNumber
.
toString
();
var
serialNumberStr
=
serialNumber
.
toString
();
var
serialIntercept
=
serialNumberStr
.
substring
(
8
);
var
serialIntercept
=
serialNumberStr
.
substring
(
8
);
...
@@ -258,7 +272,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
...
@@ -258,7 +272,7 @@ export default function ActsOsAccountThirdPartyTest_third_2() {
expect
(
serialIntercept
).
assertEqual
(
"
00000001
"
);
expect
(
serialIntercept
).
assertEqual
(
"
00000001
"
);
var
localId
=
await
osAccountManager
.
getOsAccountLocalIdBySerialNumber
(
serialNumber
);
var
localId
=
await
osAccountManager
.
getOsAccountLocalIdBySerialNumber
(
serialNumber
);
console
.
debug
(
"
====>get localId:
"
+
localId
+
"
by serialNumber:
"
+
serialNumber
);
console
.
debug
(
"
====>get localId:
"
+
localId
+
"
by serialNumber:
"
+
serialNumber
);
expect
(
localId
).
assertEqual
(
100
);
expect
(
localId
).
assertEqual
(
testLocalId
);
console
.
debug
(
"
====>ActsOsAccountLocalIdSerial_0200 end====
"
);
console
.
debug
(
"
====>ActsOsAccountLocalIdSerial_0200 end====
"
);
done
();
done
();
});
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录