Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
791f3447
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看板
未验证
提交
791f3447
编写于
1月 30, 2023
作者:
O
openharmony_ci
提交者:
Gitee
1月 30, 2023
浏览文件
操作
浏览文件
下载
差异文件
!7319 【resourceschedule】【openharmony:monthly_20221018】新增提醒代理模块api9用例
Merge pull request !7319 from 南先森/cherry-pick-1674995203
上级
52e2dd89
e98d23a4
变更
3
展开全部
显示空白变更内容
内联
并排
Showing
3 changed file
with
1672 addition
and
83 deletion
+1672
-83
resourceschedule/resourceschedule_standard/reminderagent/src/main/js/test/List.test.js
...dule_standard/reminderagent/src/main/js/test/List.test.js
+3
-0
resourceschedule/resourceschedule_standard/reminderagent/src/main/js/test/ReminderAgentJs.test.js
...rd/reminderagent/src/main/js/test/ReminderAgentJs.test.js
+0
-83
resourceschedule/resourceschedule_standard/reminderagent/src/main/js/test/ReminderAgentManagerJs.test.js
...nderagent/src/main/js/test/ReminderAgentManagerJs.test.js
+1669
-0
未找到文件。
resourceschedule/resourceschedule_standard/reminderagent/src/main/js/test/List.test.js
浏览文件 @
791f3447
...
...
@@ -13,6 +13,9 @@
* limitations under the License.
*/
import
ReminderAgentTest
from
'
./ReminderAgentJs.test.js
'
import
ReminderAgentManagerTest
from
'
./ReminderAgentManagerJs.test.js
'
export
default
function
testsuite
()
{
ReminderAgentTest
()
ReminderAgentManagerTest
()
}
resourceschedule/resourceschedule_standard/reminderagent/src/main/js/test/ReminderAgentJs.test.js
浏览文件 @
791f3447
...
...
@@ -2858,89 +2858,6 @@ export default function ReminderAgentTest() {
done
();
})
/**
* @tc.number SUB_RESOURCESCHEDULE_REMINDER_AGENT_XTS_0114
* @tc.name testPublishReminderTypeCalendarFun_0114
* @tc.desc test publish reminders with type of calendar.
*/
it
(
'
testPublishReminderTypeCalendarFun_0114
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----------------------testPublishReminderTypeCalendarFun_0114---------------------------
'
);
let
calendar
=
{
reminderType
:
reminderAgent
.
ReminderType
.
REMINDER_TYPE_CALENDAR
,
dateTime
:
{
year
:
2025
,
month
:
10
,
day
:
10
,
hour
:
23
,
minute
:
30
},
repeatMonths
:
[
2
],
repeatDays
:
[
2
],
actionButton
:
[
{
title
:
"
close
"
,
type
:
0
},
{
title
:
"
snooze
"
,
type
:
1
}
],
wantAgent
:
{
pkgName
:
"
com.oh.phone
"
,
abilityName
:
"
com.oh.phone.MainAbility
"
},
maxScreenWantAgent
:
{
pkgName
:
"
com.oh.phone
"
,
abilityName
:
"
com.oh.phone.MainAbility
"
},
ringDuration
:
5
,
snoozeTimes
:
2
,
timeInterval
:
5
,
title
:
"
this is title
"
,
content
:
"
this is content
"
,
expiredContent
:
"
this reminder has expired
"
,
snoozeContent
:
"
remind later
"
,
notificationId
:
100
,
slotType
:
3
}
reminderAgent
.
publishReminder
(
calendar
).
then
((
reminderId
)
=>
{
reminderAgent
.
getValidReminders
().
then
((
reminders
)
=>
{
for
(
let
i
=
0
;
i
<
reminders
.
length
;
i
++
)
{
console
.
info
(
"
getValidReminders =
"
+
JSON
.
stringify
(
reminders
[
i
]));
console
.
info
(
"
getValidReminders, reminderType =
"
+
reminders
[
i
].
reminderType
);
for
(
let
j
=
0
;
j
<
reminders
[
i
].
actionButton
.
length
;
j
++
)
{
console
.
info
(
"
getValidReminders, actionButton.title =
"
+
reminders
[
i
].
actionButton
[
j
].
title
);
console
.
info
(
"
getValidReminders, actionButton.type =
"
+
reminders
[
i
].
actionButton
[
j
].
type
);
}
console
.
info
(
"
getValidReminders, wantAgent.pkgName =
"
+
reminders
[
i
].
wantAgent
.
pkgName
);
console
.
info
(
"
getValidReminders, wantAgent.abilityName =
"
+
reminders
[
i
].
wantAgent
.
abilityName
);
console
.
info
(
"
getValidReminders, maxScreenWantAgent.pkgName =
\
"
+
reminders
[
i
].
maxScreenWantAgent
.
pkgName
);
console
.
info
(
"
getValidReminders, maxScreenWantAgent.abilityName =
\
"
+
reminders
[
i
].
maxScreenWantAgent
.
abilityName
);
expect
(
reminders
[
i
].
ringDuration
).
assertEqual
(
5
);
console
.
info
(
"
getValidReminders, ringDuration =
"
+
reminders
[
i
].
ringDuration
);
expect
(
reminders
[
i
].
snoozeTimes
).
assertEqual
(
2
);
console
.
info
(
"
getValidReminders, snoozeTimes =
"
+
reminders
[
i
].
snoozeTimes
);
console
.
info
(
"
getValidReminders, timeInterval =
"
+
reminders
[
i
].
timeInterval
);
expect
(
reminders
[
i
].
title
).
assertEqual
(
"
this is title
"
);
console
.
info
(
"
getValidReminders, title =
"
+
reminders
[
i
].
title
);
expect
(
reminders
[
i
].
content
).
assertEqual
(
"
this is content
"
);
console
.
info
(
"
getValidReminders, content =
"
+
reminders
[
i
].
content
);
expect
(
reminders
[
i
].
expiredContent
).
assertEqual
(
"
this reminder has expired
"
);
console
.
info
(
"
getValidReminders, expiredContent =
"
+
reminders
[
i
].
expiredContent
);
expect
(
reminders
[
i
].
snoozeContent
).
assertEqual
(
"
remind later
"
);
console
.
info
(
"
getValidReminders, snoozeContent =
"
+
reminders
[
i
].
snoozeContent
);
expect
(
reminders
[
i
].
notificationId
).
assertEqual
(
100
);
console
.
info
(
"
getValidReminders, notificationId =
"
+
reminders
[
i
].
notificationId
);
console
.
info
(
"
getValidReminders, slotType =
"
+
reminders
[
i
].
slotType
);
}
})
});
done
();
})
/**
* @tc.number SUB_RESOURCESCHEDULE_REMINDER_AGENT_XTS_0115
* @tc.name testActionButtonType_0115
...
...
resourceschedule/resourceschedule_standard/reminderagent/src/main/js/test/ReminderAgentManagerJs.test.js
0 → 100644
浏览文件 @
791f3447
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录