Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
89304c07
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
89304c07
编写于
4月 27, 2022
作者:
O
openharmony_ci
提交者:
Gitee
4月 27, 2022
浏览文件
操作
浏览文件
下载
差异文件
!3080 New use cases of global resource scheduling subsystem
Merge pull request !3080 from 火箭龟/master_427
上级
c01bb30c
4e76ef9a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
456 addition
and
7 deletion
+456
-7
resourceschedule/resourceschedule_standard/backgroundtaskmanager/src/main/js/default/test/BackgroundTaskMagrJs.test.js
...ger/src/main/js/default/test/BackgroundTaskMagrJs.test.js
+4
-7
resourceschedule/resourceschedule_standard/deviceusagestatisticsjsunit/src/main/js/default/test/DeviceUsageStatisticsJsunit.test.js
.../main/js/default/test/DeviceUsageStatisticsJsunit.test.js
+452
-0
未找到文件。
resourceschedule/resourceschedule_standard/backgroundtaskmanager/src/main/js/default/test/BackgroundTaskMagrJs.test.js
浏览文件 @
89304c07
...
...
@@ -171,7 +171,7 @@ describe("TransientTaskJsTest", function () {
function
callback
()
{}
let
info
=
backgroundTaskManager
.
requestSuspendDelay
(
"
test
"
,
callback
);
if
(
info
.
actualDealyTime
!=
-
1
)
{
console
.
info
(
'
TransientTaskJsTest00
1
backgroundTaskManager success, actualDealyTime:
'
+
console
.
info
(
'
TransientTaskJsTest00
5
backgroundTaskManager success, actualDealyTime:
'
+
info
.
actualDealyTime
);
expect
(
true
).
assertTrue
();
backgroundTaskManager
.
cancelSuspendDelay
(
info
.
requestId
)
...
...
@@ -190,18 +190,15 @@ describe("TransientTaskJsTest", function () {
it
(
"
TransientTaskJsTest006
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------TransientTaskJsTest006---------------------------
'
);
function
callback
()
{}
let
info
=
backgroundTaskManager
.
requestSuspendDelay
(
"
test
"
,
callback
);
let
info
=
backgroundTaskManager
.
requestSuspendDelay
(
"
123456
"
,
callback
);
if
(
info
.
requestId
!=
-
1
)
{
console
.
info
(
'
TransientTaskJsTest006 DelaySuspendInfo actualDealyTime:
'
+
info
.
actualDealyTime
);
backgroundTaskManager
.
cancelSuspendDelay
(
info
.
requestId
);
expect
(
true
).
assertTrue
();
}
else
{
expect
(
false
).
assertTrue
();
done
();
}
setTimeout
(()
=>
{
done
();
},
500
);
done
();
})
})
resourceschedule/resourceschedule_standard/deviceusagestatisticsjsunit/src/main/js/default/test/DeviceUsageStatisticsJsunit.test.js
浏览文件 @
89304c07
...
...
@@ -1941,6 +1941,458 @@ describe("DeviceUsageStatisticsJsTest", function () {
}
});
setTimeout
(()
=>
{
done
();
},
500
);
})
/*
* @tc.name: DeviceUsageStatisticsJsTest081
* @tc.desc: test bundleState getRecentlyUsedModules BundleActiveModuleInfo deviceId promise.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
DeviceUsageStatisticsJsTest081
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest081---------------------------
'
);
bundleState
.
getRecentlyUsedModules
().
then
((
res
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest081 promise success
'
);
for
(
let
i
=
0
;
i
<
res
.
length
;
i
++
)
{
console
.
info
(
'
BUNDLE_ACTIVE DeviceUsageStatisticsJsTest081 BundleActiveModuleInfo deviceId
'
+
JSON
.
stringify
(
res
[
i
].
deviceId
));
}
expect
(
res
).
assertInstanceOf
(
'
Array
'
);
}).
catch
((
err
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest081 promise failed, because:
'
+
err
.
code
);
expect
(
err
.
code
).
assertLarger
(
0
);
});
setTimeout
(()
=>
{
done
();
},
500
);
})
/*
* @tc.name: DeviceUsageStatisticsJsTest082
* @tc.desc: test bundleState getRecentlyUsedModules BundleActiveModuleInfo descriptionId promise.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
DeviceUsageStatisticsJsTest082
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest082---------------------------
'
);
bundleState
.
getRecentlyUsedModules
().
then
((
res
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest082 promise success
'
);
for
(
let
i
=
0
;
i
<
res
.
length
;
i
++
)
{
console
.
info
(
'
BUNDLE_ACTIVE DeviceUsageStatisticsJsTest082 BundleActiveModuleInfo descriptionId
'
+
JSON
.
stringify
(
res
[
i
].
descriptionId
));
}
expect
(
res
).
assertInstanceOf
(
'
Array
'
);
}).
catch
((
err
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest082 promise failed, because:
'
+
err
.
code
);
expect
(
err
.
code
).
assertLarger
(
0
);
});
setTimeout
(()
=>
{
done
();
},
500
);
})
/*
* @tc.name: DeviceUsageStatisticsJsTest083
* @tc.desc: test bundleState getRecentlyUsedModules BundleActiveModuleInfo moduleName promise.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
DeviceUsageStatisticsJsTest083
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest083---------------------------
'
);
bundleState
.
getRecentlyUsedModules
().
then
((
res
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest083 promise success
'
);
for
(
let
i
=
0
;
i
<
res
.
length
;
i
++
)
{
console
.
info
(
'
BUNDLE_ACTIVE DeviceUsageStatisticsJsTest083 BundleActiveModuleInfo moduleName
'
+
JSON
.
stringify
(
res
[
i
].
moduleName
));
}
expect
(
res
).
assertInstanceOf
(
'
Array
'
);
}).
catch
((
err
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest083 promise failed, because:
'
+
err
.
code
);
expect
(
err
.
code
).
assertLarger
(
0
);
});
setTimeout
(()
=>
{
done
();
},
500
);
})
/*
* @tc.name: DeviceUsageStatisticsJsTest084
* @tc.desc: test bundleState getRecentlyUsedModules BundleActiveModuleInfo labelId promise.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
DeviceUsageStatisticsJsTest084
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest084---------------------------
'
);
bundleState
.
getRecentlyUsedModules
().
then
((
res
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest084 promise success
'
);
for
(
let
i
=
0
;
i
<
res
.
length
;
i
++
)
{
console
.
info
(
'
BUNDLE_ACTIVE DeviceUsageStatisticsJsTest084 BundleActiveModuleInfo labelId
'
+
JSON
.
stringify
(
res
[
i
].
labelId
));
}
expect
(
res
).
assertInstanceOf
(
'
Array
'
);
}).
catch
((
err
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest084 promise failed, because:
'
+
err
.
code
);
expect
(
err
.
code
).
assertLarger
(
0
);
});
setTimeout
(()
=>
{
done
();
},
500
);
})
/*
* @tc.name: DeviceUsageStatisticsJsTest085
* @tc.desc: test bundleState getRecentlyUsedModules BundleActiveModuleInfo appLabelId promise.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
DeviceUsageStatisticsJsTest085
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest085---------------------------
'
);
bundleState
.
getRecentlyUsedModules
().
then
((
res
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest085 promise success
'
);
for
(
let
i
=
0
;
i
<
res
.
length
;
i
++
)
{
console
.
info
(
'
BUNDLE_ACTIVE DeviceUsageStatisticsJsTest085 BundleActiveModuleInfo appLabelId
'
+
JSON
.
stringify
(
res
[
i
].
appLabelId
));
}
expect
(
res
).
assertInstanceOf
(
'
Array
'
);
}).
catch
((
err
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest085 promise failed, because:
'
+
err
.
code
);
expect
(
err
.
code
).
assertLarger
(
0
);
});
setTimeout
(()
=>
{
done
();
},
500
);
})
/*
* @tc.name: DeviceUsageStatisticsJsTest086
* @tc.desc: test bundleState getRecentlyUsedModules BundleActiveModuleInfo abilityLableId promise.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
DeviceUsageStatisticsJsTest086
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest086---------------------------
'
);
bundleState
.
getRecentlyUsedModules
().
then
((
res
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest086 promise success
'
);
for
(
let
i
=
0
;
i
<
res
.
length
;
i
++
)
{
console
.
info
(
'
BUNDLE_ACTIVE BundleActiveModuleInfo abilityLableId
'
+
JSON
.
stringify
(
res
[
i
].
abilityLableId
));
}
expect
(
res
).
assertInstanceOf
(
'
Array
'
);
}).
catch
((
err
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest086 promise failed, because:
'
+
err
.
code
);
expect
(
err
.
code
).
assertLarger
(
0
);
});
setTimeout
(()
=>
{
done
();
},
500
);
})
/*
* @tc.name: DeviceUsageStatisticsJsTest087
* @tc.desc: test bundleState getRecentlyUsedModules BundleActiveModuleInfo abilityDescriptionId promise.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
DeviceUsageStatisticsJsTest087
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest087---------------------------
'
);
bundleState
.
getRecentlyUsedModules
().
then
((
res
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest087 promise success
'
);
for
(
let
i
=
0
;
i
<
res
.
length
;
i
++
)
{
console
.
info
(
'
BUNDLE_ACTIVE BundleActiveModuleInfo abilityDescriptionId
'
+
JSON
.
stringify
(
res
[
i
].
abilityDescriptionId
));
}
expect
(
res
).
assertInstanceOf
(
'
Array
'
);
}).
catch
((
err
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest087 promise failed, because:
'
+
err
.
code
);
expect
(
err
.
code
).
assertLarger
(
0
);
});
setTimeout
(()
=>
{
done
();
},
500
);
})
/*
* @tc.name: DeviceUsageStatisticsJsTest088
* @tc.desc: test bundleState getRecentlyUsedModules BundleActiveModuleInfo abilityIconId promise.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
DeviceUsageStatisticsJsTest088
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest088---------------------------
'
);
bundleState
.
getRecentlyUsedModules
().
then
((
res
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest088 promise success
'
);
for
(
let
i
=
0
;
i
<
res
.
length
;
i
++
)
{
console
.
info
(
'
BUNDLE_ACTIVE BundleActiveModuleInfo abilityIconId
'
+
JSON
.
stringify
(
res
[
i
].
abilityIconId
));
}
expect
(
res
).
assertInstanceOf
(
'
Array
'
);
}).
catch
((
err
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest088 promise failed, because:
'
+
err
.
code
);
expect
(
err
.
code
).
assertLarger
(
0
);
});
setTimeout
(()
=>
{
done
();
},
500
);
})
/*
* @tc.name: DeviceUsageStatisticsJsTest089
* @tc.desc: test bundleState getRecentlyUsedModules BundleActiveModuleInfo launchedCount promise.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
DeviceUsageStatisticsJsTest089
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest089---------------------------
'
);
bundleState
.
getRecentlyUsedModules
().
then
((
res
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest089 promise success
'
);
for
(
let
i
=
0
;
i
<
res
.
length
;
i
++
)
{
console
.
info
(
'
BUNDLE_ACTIVE BundleActiveModuleInfo launchedCount
'
+
JSON
.
stringify
(
res
[
i
].
launchedCount
));
}
expect
(
res
).
assertInstanceOf
(
'
Array
'
);
}).
catch
((
err
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest089 promise failed, because:
'
+
err
.
code
);
expect
(
err
.
code
).
assertLarger
(
0
);
});
setTimeout
(()
=>
{
done
();
},
500
);
})
/*
* @tc.name: DeviceUsageStatisticsJsTest090
* @tc.desc: test bundleState getRecentlyUsedModules BundleActiveModuleInfo lastModuleUsedTime promise.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
DeviceUsageStatisticsJsTest090
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest090---------------------------
'
);
bundleState
.
getRecentlyUsedModules
().
then
((
res
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest090 promise success
'
);
for
(
let
i
=
0
;
i
<
res
.
length
;
i
++
)
{
console
.
info
(
'
BUNDLE_ACTIVE BundleActiveModuleInfo lastModuleUsedTime
'
+
JSON
.
stringify
(
res
[
i
].
lastModuleUsedTime
));
}
expect
(
res
).
assertInstanceOf
(
'
Array
'
);
}).
catch
((
err
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest090 promise failed, because:
'
+
err
.
code
);
expect
(
err
.
code
).
assertLarger
(
0
);
});
setTimeout
(()
=>
{
done
();
},
500
);
})
/*
* @tc.name: DeviceUsageStatisticsJsTest091
* @tc.desc: test bundleState getRecentlyUsedModules BundleActiveModuleInfo formRecords promise.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
DeviceUsageStatisticsJsTest091
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest091---------------------------
'
);
bundleState
.
getRecentlyUsedModules
().
then
((
res
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest091 promise success
'
);
for
(
let
i
=
0
;
i
<
res
.
length
;
i
++
)
{
console
.
info
(
'
BUNDLE_ACTIVE BundleActiveModuleInfo formRecords
'
+
JSON
.
stringify
(
res
[
i
].
formRecords
));
}
expect
(
res
).
assertInstanceOf
(
'
Array
'
);
}).
catch
((
err
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest091 promise failed, because:
'
+
err
.
code
);
expect
(
err
.
code
).
assertLarger
(
0
);
});
setTimeout
(()
=>
{
done
();
},
500
);
})
/*
* @tc.name: DeviceUsageStatisticsJsTest092
* @tc.desc: test bundleState getRecentlyUsedModules BundleActiveFormInfo promise.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
DeviceUsageStatisticsJsTest092
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest092---------------------------
'
);
bundleState
.
getRecentlyUsedModules
().
then
((
res
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest092 promise success
'
);
let
BundleActiveFormInfo
=
res
[
0
].
formRecords
;
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest092 promise BundleActiveFormInfo:
'
+
JSON
.
stringify
(
BundleActiveFormInfo
));
expect
(
BundleActiveFormInfo
).
assertInstanceOf
(
'
Array
'
);
}).
catch
((
err
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest092 promise failed, because:
'
+
err
.
code
);
expect
(
err
.
code
).
assertLarger
(
0
);
});
setTimeout
(()
=>
{
done
();
},
500
);
})
/*
* @tc.name: DeviceUsageStatisticsJsTest093
* @tc.desc: test bundleState getRecentlyUsedModules BundleActiveFormInfo formName promise.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
DeviceUsageStatisticsJsTest093
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest093---------------------------
'
);
bundleState
.
getRecentlyUsedModules
().
then
((
res
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest093 promise success
'
);
let
BundleActiveFormInfo
=
res
[
0
].
formRecords
;
expect
(
BundleActiveFormInfo
).
assertInstanceOf
(
'
Array
'
);
console
.
info
(
'
test DeviceUsageStatisticsJsTest093 length:
'
+
BundleActiveFormInfo
.
length
);
if
(
BundleActiveFormInfo
.
length
===
0
)
{
BundleActiveFormInfo
=
[{
formName
:
'
formName
'
}];
}
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest093 promise BundleActiveFormInfo formName:
'
+
BundleActiveFormInfo
[
0
].
formName
);
}).
catch
((
err
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest093 promise failed, because:
'
+
err
.
code
);
expect
(
err
.
code
).
assertLarger
(
0
);
});
setTimeout
(()
=>
{
done
();
},
500
);
})
/*
* @tc.name: DeviceUsageStatisticsJsTest094
* @tc.desc: test bundleState getRecentlyUsedModules BundleActiveFormInfo formDimension promise.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
DeviceUsageStatisticsJsTest094
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest094---------------------------
'
);
bundleState
.
getRecentlyUsedModules
().
then
((
res
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest094 promise success
'
);
let
BundleActiveFormInfo
=
res
[
0
].
formRecords
;
if
(
BundleActiveFormInfo
.
length
===
0
)
{
BundleActiveFormInfo
=
[{
formDimension
:
'
formDimension
'
}];
}
console
.
info
(
'
test bundle promise BundleActiveFormInfo formDimension:
'
+
BundleActiveFormInfo
[
0
].
formDimension
);
expect
(
BundleActiveFormInfo
).
assertInstanceOf
(
'
Array
'
);
}).
catch
((
err
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest094 promise failed, because:
'
+
err
.
code
);
expect
(
err
.
code
).
assertLarger
(
0
);
});
setTimeout
(()
=>
{
done
();
},
500
);
})
/*
* @tc.name: DeviceUsageStatisticsJsTest095
* @tc.desc: test bundleState getRecentlyUsedModules BundleActiveFormInfo formId promise.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
DeviceUsageStatisticsJsTest095
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest095---------------------------
'
);
bundleState
.
getRecentlyUsedModules
(
10
).
then
((
res
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest095 promise success
'
);
let
BundleActiveFormInfo
=
res
[
0
].
formRecords
;
if
(
BundleActiveFormInfo
.
length
===
0
)
{
BundleActiveFormInfo
=
[{
formId
:
'
formId
'
}];
}
console
.
info
(
'
test bundle promise BundleActiveFormInfo formId:
'
+
BundleActiveFormInfo
[
0
].
formId
);
expect
(
BundleActiveFormInfo
).
assertInstanceOf
(
'
Array
'
);
}).
catch
((
err
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest095 promise failed, because:
'
+
err
.
code
);
expect
(
err
.
code
).
assertLarger
(
0
);
});
setTimeout
(()
=>
{
done
();
},
500
);
})
/*
* @tc.name: DeviceUsageStatisticsJsTest096
* @tc.desc: test bundleState getRecentlyUsedModules BundleActiveFormInfo formId promise.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
DeviceUsageStatisticsJsTest096
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest096---------------------------
'
);
bundleState
.
getRecentlyUsedModules
().
then
((
res
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest096 promise success
'
);
let
BundleActiveFormInfo
=
res
[
0
].
formRecords
;
if
(
BundleActiveFormInfo
.
length
===
0
)
{
BundleActiveFormInfo
=
[{
formId
:
'
formId
'
}];
}
console
.
info
(
'
test bundle promise BundleActiveFormInfo formId:
'
+
BundleActiveFormInfo
[
0
].
formId
);
expect
(
BundleActiveFormInfo
).
assertInstanceOf
(
'
Array
'
);
}).
catch
((
err
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest096 promise failed, because:
'
+
err
.
code
);
expect
(
err
.
code
).
assertLarger
(
0
);
});
setTimeout
(()
=>
{
done
();
},
500
);
})
/*
* @tc.name: DeviceUsageStatisticsJsTest097
* @tc.desc: test bundleState getRecentlyUsedModules BundleActiveFormInfo formLastUsedTime promise.
* @tc.type: FUNC
* @tc.require:
*/
it
(
"
DeviceUsageStatisticsJsTest097
"
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------DeviceUsageStatisticsJsTest097---------------------------
'
);
bundleState
.
getRecentlyUsedModules
().
then
((
res
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest097 promise success
'
);
let
BundleActiveFormInfo
=
res
[
0
].
formRecords
;
if
(
BundleActiveFormInfo
.
length
===
0
)
{
BundleActiveFormInfo
=
[{
formLastUsedTime
:
'
formLastUsedTime
'
}];
}
console
.
info
(
'
test bundle promise BundleActiveFormInfo formLastUsedTime:
'
+
BundleActiveFormInfo
[
0
].
formLastUsedTime
);
expect
(
BundleActiveFormInfo
).
assertInstanceOf
(
'
Array
'
);
}).
catch
((
err
)
=>
{
console
.
info
(
'
test bundle DeviceUsageStatisticsJsTest097 promise failed, because:
'
+
err
.
code
);
expect
(
err
.
code
).
assertLarger
(
0
);
});
setTimeout
(()
=>
{
done
();
},
500
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录