Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
3c11f96e
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看板
未验证
提交
3c11f96e
编写于
7月 07, 2022
作者:
O
openharmony_ci
提交者:
Gitee
7月 07, 2022
浏览文件
操作
浏览文件
下载
差异文件
!4156 【resourceschedule】【master】全局资源调度提醒代理模块XTS用例doc描述整改
Merge pull request !4156 from 南先森/rms0706
上级
1d4797a2
faf6567d
变更
3
展开全部
隐藏空白更改
内联
并排
Showing
3 changed file
with
741 addition
and
3218 deletion
+741
-3218
resourceschedule/resourceschedule_standard/deviceusagestatisticsjsunit/src/main/js/default/test/BundleState.test.js
...isticsjsunit/src/main/js/default/test/BundleState.test.js
+0
-506
resourceschedule/resourceschedule_standard/deviceusagestatisticsjsunit/src/main/js/default/test/DeviceUsageStatisticsJsunit.test.js
.../main/js/default/test/DeviceUsageStatisticsJsunit.test.js
+87
-2075
resourceschedule/resourceschedule_standard/reminderagent/src/main/js/default/test/ReminderAgentJs.test.js
...deragent/src/main/js/default/test/ReminderAgentJs.test.js
+654
-637
未找到文件。
resourceschedule/resourceschedule_standard/deviceusagestatisticsjsunit/src/main/js/default/test/BundleState.test.js
浏览文件 @
3c11f96e
...
...
@@ -55,49 +55,6 @@ describe('bundlestate', function() {
console
.
info
(
'
afterEach caled
'
)
})
/*
* @tc.number: SUB_INTELLITV_JS_BUNDLE_0001
* @tc.name: queryAppUsagePriorityGroup_001.
* @tc.desc: Execute queryAppUsagePriorityGroup with callback.
* @tc.size: MEDIUM
* @tc.type: Function
* @tc.level: level 0
*/
it
(
'
queryAppUsagePriorityGroup_001
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
queryAppUsagePriorityGroup_001 start
'
);
bundlestate
.
queryAppUsagePriorityGroup
((
err
,
data
)
=>
{
if
(
err
)
{
console
.
info
(
'
queryAppUsagePriorityGroup_001 callback fail result =
'
+
err
);
}
else
{
console
.
info
(
'
queryAppUsagePriorityGroup_001 callback success result =
'
+
JSON
.
stringify
(
data
));
expect
(
true
).
assertEqual
(
true
)
}
done
();
});
console
.
info
(
'
queryAppUsagePriorityGroup_001 end
'
);
})
/*
* @tc.number: SUB_INTELLITV_JS_BUNDLE_0002
* @tc.name: queryAppUsagePriorityGroup_002.
* @tc.desc: Execute queryAppUsagePriorityGroup with Promise.
* @tc.size: MEDIUM
* @tc.type: Function
* @tc.level: level 0
*/
it
(
'
queryAppUsagePriorityGroup_002
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
queryAppUsagePriorityGroup_002 start
'
);
bundlestate
.
queryAppUsagePriorityGroup
().
then
((
data
)
=>
{
console
.
info
(
'
queryAppUsagePriorityGroup_002 callback success result =
'
+
JSON
.
stringify
(
data
));
expect
(
true
).
assertEqual
(
true
);
done
();
}).
catch
((
err
)
=>
{
console
.
info
(
'
queryAppUsagePriorityGroup_002 callback fail result =
'
+
JSON
.
stringify
(
err
.
code
));
expect
(
err
.
code
).
assertLarger
(
0
);
})
console
.
info
(
'
queryAppUsagePriorityGroup_002 end
'
);
})
/*
* @tc.number: SUB_INTELLITV_JS_BUNDLE_0024
* @tc.name: merge_024.
...
...
@@ -232,469 +189,6 @@ describe('bundlestate', function() {
console
.
info
(
'
merge_028 end
'
);
})
/*
* @tc.number: SUB_INTELLITV_JS_BUNDLE_0041
* @tc.name: queryCurrentBundleActiveStates_041.
* @tc.desc: Execute queryCurrentBundleActiveStates with callback.
* @tc.size: MEDIUM
* @tc.type: Function
* @tc.level: level 0
*/
it
(
'
queryCurrentBundleActiveStates_041
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
queryCurrentBundleActiveStates_041 start
'
);
let
time
=
{
'
begin
'
:
0
,
'
end
'
:
0
};
let
initTime
=
function
()
{
var
now
=
new
Date
().
getTime
();
time
.
begin
=
now
-
86400000
;
time
.
end
=
now
;
};
initTime
();
bundlestate
.
queryCurrentBundleActiveStates
(
time
.
begin
,
time
.
end
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
info
(
'
queryCurrentBundleActiveStates_041 callback fail result =
'
+
err
);
expect
(
data
).
assertFail
();
}
else
{
console
.
info
(
'
queryCurrentBundleActiveStates_041 callback success result =
'
+
JSON
.
stringify
(
data
));
expect
(
data
).
assertInstanceOf
(
'
Array
'
);
}
done
();
});
console
.
info
(
'
queryCurrentBundleActiveStates_041 end
'
);
})
/*
* @tc.number: SUB_INTELLITV_JS_BUNDLE_0042
* @tc.name: queryCurrentBundleActiveStates_042.
* @tc.desc: Execute queryCurrentBundleActiveStates with promise.
* @tc.size: MEDIUM
* @tc.type: Function
* @tc.level: level 0
*/
it
(
'
queryCurrentBundleActiveStates_042
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
queryCurrentBundleActiveStates_042 start
'
);
let
timer
=
onInit
();
bundlestate
.
queryCurrentBundleActiveStates
(
timer
.
startTime
,
timer
.
endTime
).
then
((
data
)
=>
{
console
.
info
(
'
queryCurrentBundleActiveStates_042 promise success result =
'
+
JSON
.
stringify
(
data
));
expect
(
data
).
assertInstanceOf
(
'
Array
'
);
}).
catch
((
err
)
=>
{
console
.
info
(
'
queryCurrentBundleActiveStates_042 promise fail result =
'
+
err
.
code
);
expect
(
data
).
assertFail
();
})
done
();
console
.
info
(
'
queryCurrentBundleActiveStates_042 end
'
);
})
/*
* @tc.number: SUB_INTELLITV_JS_BUNDLE_0043
* @tc.name: queryCurrentBundleActiveStates_043.
* @tc.desc: Execute queryCurrentBundleActiveStates with callback.
* @tc.size: MEDIUM
* @tc.type: Function
* @tc.level: level 0
*/
it
(
'
queryCurrentBundleActiveStates_043
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
queryCurrentBundleActiveStates_043 start
'
);
bundlestate
.
queryCurrentBundleActiveStates
(
true
,
false
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
info
(
'
queryCurrentBundleActiveStates_043 callback fail result =
'
+
JSON
.
stringify
(
err
.
code
));
expect
(
err
.
code
).
assertLarger
(
0
);
}
else
{
console
.
info
(
'
queryCurrentBundleActiveStates_043 callback success result =
'
+
JSON
.
stringify
(
data
));
expect
(
data
).
assertFail
();
}
done
();
});
console
.
info
(
'
queryCurrentBundleActiveStates_043 end
'
);
})
/*
* @tc.number: SUB_INTELLITV_JS_BUNDLE_0066
* @tc.name: queryCurrentBundleActiveStates_066.
* @tc.desc: Execute queryCurrentBundleActiveStates with promise.
* @tc.size: MEDIUM
* @tc.type: Function
* @tc.level: level 0
*/
it
(
'
queryCurrentBundleActiveStates_066
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
queryCurrentBundleActiveStates_066 start
'
);
bundlestate
.
queryCurrentBundleActiveStates
(
true
,
false
).
then
((
res
)
=>
{
console
.
info
(
'
queryCurrentBundleActiveStates_066 promise success result =
'
+
JSON
.
stringify
(
res
));
expect
(
res
).
assertFail
();
}).
catch
((
err
)
=>
{
console
.
info
(
'
queryCurrentBundleActiveStates_066 promise fail result =
'
+
JSON
.
stringify
(
err
));
expect
(
err
.
code
).
assertLarger
(
0
);
})
done
();
console
.
info
(
'
queryCurrentBundleActiveStates_066 end
'
);
})
/*
* @tc.number: SUB_INTELLITV_JS_BUNDLE_0044
* @tc.name: queryCurrentBundleActiveStates_044.
* @tc.desc: Execute queryCurrentBundleActiveStates with callback.
* @tc.size: MEDIUM
* @tc.type: Function
* @tc.level: level 0
*/
it
(
'
queryCurrentBundleActiveStates_044
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
queryCurrentBundleActiveStates_044 start
'
);
let
timer
=
onInit
();
bundlestate
.
queryCurrentBundleActiveStates
(
timer
.
startTime
,
''
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
info
(
'
queryCurrentBundleActiveStates_044 callback fail result =
'
+
JSON
.
stringify
(
err
.
code
));
expect
(
err
.
code
).
assertLarger
(
0
);
}
else
{
console
.
info
(
'
queryCurrentBundleActiveStates_044 callback success result =
'
+
JSON
.
stringify
(
data
));
expect
(
data
).
assertFail
();
}
done
();
});
console
.
info
(
'
queryCurrentBundleActiveStates_044 end
'
);
})
/*
* @tc.number: SUB_INTELLITV_JS_BUNDLE_0067
* @tc.name: queryCurrentBundleActiveStates_067.
* @tc.desc: Execute queryCurrentBundleActiveStates with promise.
* @tc.size: MEDIUM
* @tc.type: Function
* @tc.level: level 0
*/
it
(
'
queryCurrentBundleActiveStates_067
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
queryCurrentBundleActiveStates_067 start
'
);
let
timer
=
onInit
();
bundlestate
.
queryCurrentBundleActiveStates
(
timer
.
startTime
,
''
).
then
((
data
)
=>
{
console
.
info
(
'
queryCurrentBundleActiveStates_067 promise success result =
'
+
JSON
.
stringify
(
data
));
expect
(
data
).
assertFail
();
}).
catch
((
err
)
=>
{
console
.
info
(
'
queryCurrentBundleActiveStates_067 promise fail result =
'
+
JSON
.
stringify
(
err
.
code
));
expect
(
err
.
code
).
assertLarger
(
0
);
});
done
();
console
.
info
(
'
queryCurrentBundleActiveStates_067 end
'
);
})
/*
* @tc.number: SUB_INTELLITV_JS_BUNDLE_0045
* @tc.name: queryCurrentBundleActiveStates_045.
* @tc.desc: Execute queryCurrentBundleActiveStates with callback.
* @tc.size: MEDIUM
* @tc.type: Function
* @tc.level: level 0
*/
it
(
'
queryCurrentBundleActiveStates_045
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
queryCurrentBundleActiveStates_045 start
'
);
bundlestate
.
queryCurrentBundleActiveStates
(
true
,
-
1
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
info
(
'
queryCurrentBundleActiveStates_045 callback fail result =
'
+
err
.
code
);
expect
(
err
.
code
).
assertLarger
(
0
);
}
else
{
console
.
info
(
'
queryCurrentBundleActiveStates_045 callback success result =
'
+
JSON
.
stringify
(
data
));
expect
(
data
).
assertFail
();
}
done
();
});
console
.
info
(
'
queryCurrentBundleActiveStates_045 end
'
);
})
/*
* @tc.number: SUB_INTELLITV_JS_BUNDLE_0068
* @tc.name: queryCurrentBundleActiveStates_068.
* @tc.desc: Execute queryCurrentBundleActiveStates with promise.
* @tc.size: MEDIUM
* @tc.type: Function
* @tc.level: level 0
*/
it
(
'
queryCurrentBundleActiveStates_068
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
queryCurrentBundleActiveStates_068 start
'
);
bundlestate
.
queryCurrentBundleActiveStates
(
true
,
-
1
).
then
((
data
)
=>
{
console
.
info
(
'
queryCurrentBundleActiveStates_068 promise success result =
'
+
JSON
.
stringify
(
data
));
expect
(
data
).
assertFail
();
}).
catch
((
err
)
=>
{
console
.
info
(
'
queryCurrentBundleActiveStates_068 promise fail result =
'
+
err
.
code
);
expect
(
err
.
code
).
assertLarger
(
0
);
});
done
();
console
.
info
(
'
queryCurrentBundleActiveStates_068 end
'
);
})
/*
* @tc.number: SUB_INTELLITV_JS_BUNDLE_0046
* @tc.name: queryCurrentBundleActiveStates_046.
* @tc.desc: Execute queryCurrentBundleActiveStates with callback.
* @tc.size: MEDIUM
* @tc.type: Function
* @tc.level: level 0
*/
it
(
'
queryCurrentBundleActiveStates_046
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
queryCurrentBundleActiveStates_046 start
'
);
bundlestate
.
queryCurrentBundleActiveStates
(
10001
,
'
timer.endTime
'
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
info
(
'
queryCurrentBundleActiveStates_046 callback fail result =
'
+
JSON
.
stringify
(
err
.
code
));
expect
(
err
.
code
).
assertLarger
(
0
);
}
else
{
console
.
info
(
'
queryCurrentBundleActiveStates_046 callback success result =
'
+
JSON
.
stringify
(
data
));
expect
(
data
).
assertFail
();
}
done
();
});
console
.
info
(
'
queryCurrentBundleActiveStates_046 end
'
);
})
/*
* @tc.number: SUB_INTELLITV_JS_BUNDLE_0069
* @tc.name: queryCurrentBundleActiveStates_069.
* @tc.desc: Execute queryCurrentBundleActiveStates with promise.
* @tc.size: MEDIUM
* @tc.type: Function
* @tc.level: level 0
*/
it
(
'
queryCurrentBundleActiveStates_069
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
queryCurrentBundleActiveStates_069 start
'
);
bundlestate
.
queryCurrentBundleActiveStates
(
10001
,
'
timer.endTime
'
).
then
((
data
)
=>
{
console
.
info
(
'
queryCurrentBundleActiveStates_069 promise success result =
'
+
JSON
.
stringify
(
data
));
expect
(
data
).
assertFail
()
}).
catch
((
err
)
=>
{
console
.
info
(
'
queryCurrentBundleActiveStates_069 promise fail result =
'
+
JSON
.
stringify
(
err
.
code
));
expect
(
err
.
code
).
assertLarger
(
0
);
});
done
();
console
.
info
(
'
queryCurrentBundleActiveStates_069 end
'
);
})
/*
* @tc.number: SUB_INTELLITV_JS_BUNDLE_0047
* @tc.name: queryCurrentBundleActiveStates_047.
* @tc.desc: Execute queryCurrentBundleActiveStates with callback.
* @tc.size: MEDIUM
* @tc.type: Function
* @tc.level: level 0
*/
it
(
'
queryCurrentBundleActiveStates_047
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
queryCurrentBundleActiveStates_047 start
'
);
let
timer
=
onInit
();
bundlestate
.
queryCurrentBundleActiveStates
(
timer
.
startTime
,
timer
.
startTime
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
info
(
'
queryCurrentBundleActiveStates_047 callback fail result =
'
+
JSON
.
stringify
(
err
.
code
));
expect
(
err
.
code
).
assertLarger
(
0
);
}
else
{
console
.
info
(
'
queryCurrentBundleActiveStates_047 callback success result =
'
+
JSON
.
stringify
(
data
));
expect
(
data
).
assertFail
();
}
done
();
});
console
.
info
(
'
queryCurrentBundleActiveStates_047 end
'
);
})
/*
* @tc.number: SUB_INTELLITV_JS_BUNDLE_0070
* @tc.name: queryCurrentBundleActiveStates_070.
* @tc.desc: Execute queryCurrentBundleActiveStates with promise.
* @tc.size: MEDIUM
* @tc.type: Function
* @tc.level: level 0
*/
it
(
'
queryCurrentBundleActiveStates_070
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
queryCurrentBundleActiveStates_070 start
'
);
let
timer
=
onInit
();
bundlestate
.
queryCurrentBundleActiveStates
(
timer
.
startTime
,
timer
.
startTime
).
then
((
data
)
=>
{
console
.
info
(
'
queryCurrentBundleActiveStates_070 promise success result =
'
+
JSON
.
stringify
(
data
));
expect
(
data
).
assertFail
();
}).
catch
((
err
)
=>
{
console
.
info
(
'
queryCurrentBundleActiveStates_070 promise fail result =
'
+
JSON
.
stringify
(
err
.
code
));
expect
(
err
.
code
).
assertLarger
(
0
);
});
done
();
console
.
info
(
'
queryCurrentBundleActiveStates_070 end
'
);
})
/*
* @tc.number: SUB_INTELLITV_JS_BUNDLE_0048
* @tc.name: queryCurrentBundleActiveStates_048.
* @tc.desc: Execute queryCurrentBundleActiveStates with callback.
* @tc.size: MEDIUM
* @tc.type: Function
* @tc.level: level 0
*/
it
(
'
queryCurrentBundleActiveStates_048
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
queryCurrentBundleActiveStates_048 start
'
);
let
timer
=
onInit
();
bundlestate
.
queryCurrentBundleActiveStates
(
timer
.
endTime
,
timer
.
startTime
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
info
(
'
queryCurrentBundleActiveStates_048 callback fail result =
'
+
JSON
.
stringify
(
err
.
code
));
expect
(
err
.
code
).
assertLarger
(
0
);
}
else
{
console
.
info
(
'
queryCurrentBundleActiveStates_048 callback success result =
'
+
JSON
.
stringify
(
data
));
expect
(
data
).
assertFail
();
}
done
();
});
console
.
info
(
'
queryCurrentBundleActiveStates_048 end
'
);
})
/*
* @tc.number: SUB_INTELLITV_JS_BUNDLE_0071
* @tc.name: queryCurrentBundleActiveStates_071.
* @tc.desc: Execute queryCurrentBundleActiveStates with promise.
* @tc.size: MEDIUM
* @tc.type: Function
* @tc.level: level 0
*/
it
(
'
queryCurrentBundleActiveStates_071
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
queryCurrentBundleActiveStates_071 start
'
);
let
timer
=
onInit
();
bundlestate
.
queryCurrentBundleActiveStates
(
timer
.
endTime
,
timer
.
startTime
).
then
((
data
)
=>
{
console
.
info
(
'
queryCurrentBundleActiveStates_071 promise success result =
'
+
JSON
.
stringify
(
data
));
expect
(
data
).
assertFail
();
}).
catch
((
err
)
=>
{
console
.
info
(
'
queryCurrentBundleActiveStates_071 promise fail result =
'
+
JSON
.
stringify
(
err
.
code
));
expect
(
err
.
code
).
assertLarger
(
0
);
});
done
();
console
.
info
(
'
queryCurrentBundleActiveStates_071 end
'
);
})
/*
* @tc.number: SUB_INTELLITV_JS_BUNDLE_0049
* @tc.name: queryCurrentBundleActiveStates_049.
* @tc.desc: Execute queryCurrentBundleActiveStates with callback.
* @tc.size: MEDIUM
* @tc.type: Function
* @tc.level: level 0
*/
it
(
'
queryCurrentBundleActiveStates_049
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
queryCurrentBundleActiveStates_049 start
'
);
let
timer
=
onInit
();
bundlestate
.
queryCurrentBundleActiveStates
(
3.145
,
timer
.
startTime
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
info
(
'
queryCurrentBundleActiveStates_049 callback fail result =
'
+
JSON
.
stringify
(
err
.
code
));
expect
(
err
.
code
).
assertLarger
(
0
);
}
else
{
console
.
info
(
'
queryCurrentBundleActiveStates_049 callback success result =
'
+
JSON
.
stringify
(
data
));
expect
(
data
).
assertInstanceOf
(
'
Array
'
);
}
done
();
});
console
.
info
(
'
queryCurrentBundleActiveStates_049 end
'
);
})
/*
* @tc.number: SUB_INTELLITV_JS_BUNDLE_0072
* @tc.name: queryCurrentBundleActiveStates_072.
* @tc.desc: Execute queryCurrentBundleActiveStates with promise.
* @tc.size: MEDIUM
* @tc.type: Function
* @tc.level: level 0
*/
it
(
'
queryCurrentBundleActiveStates_072
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
queryCurrentBundleActiveStates_072 start
'
);
let
timer
=
onInit
();
bundlestate
.
queryCurrentBundleActiveStates
(
3.145
,
timer
.
startTime
).
then
((
data
)
=>
{
console
.
info
(
'
queryCurrentBundleActiveStates_072 promise success result =
'
+
JSON
.
stringify
(
data
));
expect
(
data
).
assertInstanceOf
(
'
Array
'
);
}).
catch
((
err
)
=>
{
console
.
info
(
'
queryCurrentBundleActiveStates_072 promise fail result =
'
+
JSON
.
stringify
(
err
.
code
));
expect
(
err
.
code
).
assertLarger
(
0
);
});
done
();
console
.
info
(
'
queryCurrentBundleActiveStates_072 end
'
);
})
/*
* @tc.number: SUB_INTELLITV_JS_BUNDLE_0050
* @tc.name: queryCurrentBundleActiveStates_050.
* @tc.desc: Execute queryCurrentBundleActiveStates with callback.
* @tc.size: MEDIUM
* @tc.type: Function
* @tc.level: level 0
*/
it
(
'
queryCurrentBundleActiveStates_050
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
queryCurrentBundleActiveStates_050 start
'
);
let
timer
=
onInit
();
bundlestate
.
queryCurrentBundleActiveStates
(
''
,
''
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
info
(
'
queryCurrentBundleActiveStates_050 callback fail result =
'
+
JSON
.
stringify
(
err
.
code
));
expect
(
err
.
code
).
assertLarger
(
0
);
}
else
{
console
.
info
(
'
queryCurrentBundleActiveStates_050 callback success result =
'
+
JSON
.
stringify
(
data
));
expect
(
data
).
assertFail
();
}
done
();
});
console
.
info
(
'
queryCurrentBundleActiveStates_050 end
'
);
})
/*
* @tc.number: SUB_INTELLITV_JS_BUNDLE_0073
* @tc.name: queryCurrentBundleActiveStates_073.
* @tc.desc: Execute queryCurrentBundleActiveStates with promise.
* @tc.size: MEDIUM
* @tc.type: Function
* @tc.level: level 0
*/
it
(
'
queryCurrentBundleActiveStates_073
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
queryCurrentBundleActiveStates_073 start
'
);
let
timer
=
onInit
();
bundlestate
.
queryCurrentBundleActiveStates
(
''
,
''
).
then
((
data
)
=>
{
console
.
info
(
'
queryCurrentBundleActiveStates_073 promise success result =
'
+
JSON
.
stringify
(
data
));
expect
(
data
).
assertFail
();
}).
catch
((
err
)
=>
{
console
.
info
(
'
queryCurrentBundleActiveStates_073 promise fail result =
'
+
JSON
.
stringify
(
err
.
code
));
expect
(
err
.
code
).
assertLarger
(
0
);
});
done
();
console
.
info
(
'
queryCurrentBundleActiveStates_073 end
'
);
})
/*
* @tc.number: SUB_INTELLITV_JS_BUNDLE_0051
* @tc.name: queryCurrentBundleActiveStates_051.
* @tc.desc: Execute queryCurrentBundleActiveStates with callback.
* @tc.size: MEDIUM
* @tc.type: Function
* @tc.level: level 0
*/
it
(
'
queryCurrentBundleActiveStates_051
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
queryCurrentBundleActiveStates_051 start
'
);
let
timer
=
onInit
();
bundlestate
.
queryCurrentBundleActiveStates
(
null
,
null
,
(
err
,
data
)
=>
{
if
(
err
)
{
console
.
info
(
'
queryCurrentBundleActiveStates_051 callback fail result =
'
+
JSON
.
stringify
(
err
.
code
));
expect
(
err
.
code
).
assertLarger
(
0
);
}
else
{
console
.
info
(
'
queryCurrentBundleActiveStates_051 callback success result =
'
+
JSON
.
stringify
(
data
));
expect
(
data
).
assertFail
();
}
done
();
});
console
.
info
(
'
queryCurrentBundleActiveStates_051 end
'
);
})
/*
* @tc.number: SUB_INTELLITV_JS_BUNDLE_0074
* @tc.name: queryCurrentBundleActiveStates_074.
* @tc.desc: Execute queryCurrentBundleActiveStates with promise.
* @tc.size: MEDIUM
* @tc.type: Function
* @tc.level: level 0
*/
it
(
'
queryCurrentBundleActiveStates_074
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
queryCurrentBundleActiveStates_074 start
'
);
let
timer
=
onInit
();
bundlestate
.
queryCurrentBundleActiveStates
(
null
,
null
).
then
((
data
)
=>
{
console
.
info
(
'
queryCurrentBundleActiveStates_074 promise success result =
'
+
JSON
.
stringify
(
data
));
expect
(
data
).
assertFail
();
}).
catch
((
err
)
=>
{
console
.
info
(
'
queryCurrentBundleActiveStates_074 promise fail result =
'
+
JSON
.
stringify
(
err
.
code
));
expect
(
err
.
code
).
assertLarger
(
0
);
});
done
();
console
.
info
(
'
queryCurrentBundleActiveStates_074 end
'
);
})
/*
* @tc.number: SUB_INTELLITV_JS_BUNDLE_0052
* @tc.name: isIdleState_052.
...
...
resourceschedule/resourceschedule_standard/deviceusagestatisticsjsunit/src/main/js/default/test/DeviceUsageStatisticsJsunit.test.js
浏览文件 @
3c11f96e
此差异已折叠。
点击以展开。
resourceschedule/resourceschedule_standard/reminderagent/src/main/js/default/test/ReminderAgentJs.test.js
浏览文件 @
3c11f96e
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录