提交 a33e76bc 编写于 作者: Z zhijianwen

--SecondaryDirectory--

Signed-off-by: Nzhijianwen <zhijianwen@huawei.com>
上级 0b8d0c24
...@@ -20,7 +20,7 @@ group("ans_standard") { ...@@ -20,7 +20,7 @@ group("ans_standard") {
"actsNotificationManagerSlotTest:ActsNotificationManagerSlotTest", "actsNotificationManagerSlotTest:ActsNotificationManagerSlotTest",
"actsNotificationPublishTest:ActsNotificationPublishTest", "actsNotificationPublishTest:ActsNotificationPublishTest",
"actsNotificationRequestTest:ActsNotificationRequestTest", "actsNotificationRequestTest:ActsNotificationRequestTest",
"actsNotificationSecondaryDirectory:ActsNotificationSecondaryDirectory", "actsNotificationSecondaryDirectoryTest:ActsNotificationSecondaryDirectoryTest",
"actsNotificationShowTest:ActsNotificationShowTest", "actsNotificationShowTest:ActsNotificationShowTest",
"actsNotificationSlotTest:ActsNotificationSlotTest", "actsNotificationSlotTest:ActsNotificationSlotTest",
"actsNotificationWantAgentTest:ActsNotificationWantAgentTest", "actsNotificationWantAgentTest:ActsNotificationWantAgentTest",
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("ActsNotificationSecondaryDirectory") { ohos_js_hap_suite("ActsNotificationSecondaryDirectoryTest") {
hap_profile = "entry/src/main/module.json" hap_profile = "entry/src/main/module.json"
js_build_mode = "debug" js_build_mode = "debug"
deps = [ deps = [
...@@ -22,7 +22,7 @@ ohos_js_hap_suite("ActsNotificationSecondaryDirectory") { ...@@ -22,7 +22,7 @@ ohos_js_hap_suite("ActsNotificationSecondaryDirectory") {
] ]
ets2abc = true ets2abc = true
certificate_profile = "signature/openharmony_sx.p7b" certificate_profile = "signature/openharmony_sx.p7b"
hap_name = "ActsNotificationSecondaryDirectory" hap_name = "ActsNotificationSecondaryDirectoryTest"
subsystem_name = "ability" subsystem_name = "ability"
part_name = "ability_runtime" part_name = "ability_runtime"
} }
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
"kits": [ "kits": [
{ {
"test-file-name": [ "test-file-name": [
"ActsNotificationSecondaryDirectory.hap" "ActsNotificationSecondaryDirectoryTest.hap"
], ],
"type": "AppInstallKit", "type": "AppInstallKit",
"cleanup-apps": true "cleanup-apps": true
......
...@@ -13,17 +13,37 @@ ...@@ -13,17 +13,37 @@
* limitations under the License. * limitations under the License.
*/ */
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
import notify from '@ohos.notificationManager' import notificationManager from '@ohos.notificationManager'
import WantAgent from '@ohos.wantAgent' import WantAgent from '@ohos.wantAgent'
import image from '@ohos.multimedia.image' import image from '@ohos.multimedia.image'
var timeout = 1000; export default function ActsNotificationSecondaryDirectoryTest() {
describe('SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST', function () {
export default function secondaryDirectoryTest() {
describe('secondaryDirectoryTest', function () {
let TAG = 'SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST ===>' let TAG = 'SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST ===>'
console.info(TAG + 'SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST START') console.info(TAG + 'SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST START')
afterEach(async function (done) {
console.info(`${TAG} afterEach START`)
try{
await notificationManager.cancelAll((err) => {
if (err) {
console.info(`${TAG} cancelAll notification errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
} else {
console.info(`${TAG} cancelAll notification success`)
expect(true).assertTrue()
done()
}
});
} catch (err) {
console.info(`${TAG} cancelAll notification errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue()
done()
}
console.info(`${TAG} afterEach END`)
})
/* /*
* @tc.number: SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0100 * @tc.number: SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0100
* @tc.name: NotificationRequest、NotificationContent、NotificationBasicContent * @tc.name: NotificationRequest、NotificationContent、NotificationBasicContent
...@@ -32,24 +52,24 @@ describe('secondaryDirectoryTest', function () { ...@@ -32,24 +52,24 @@ describe('secondaryDirectoryTest', function () {
it('SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0100', 0, async function (done) { it('SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0100', 0, async function (done) {
console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0100 START`); console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0100 START`);
let basicContent: notify.NotificationBasicContent = { let basicContent: notificationManager.NotificationBasicContent = {
title: "test_title", title: "test_title",
text: "test_text", text: "test_text",
additionalText: "test_Publish" additionalText: "test_Publish"
} }
let notifyContent: notify.NotificationContent = { let notifyContent: notificationManager.NotificationContent = {
contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, contentType: notificationManager.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT,
normal: basicContent normal: basicContent
} }
let notificationRequest : notify.NotificationRequest = { let notificationRequest : notificationManager.NotificationRequest = {
content: notifyContent, content: notifyContent,
id: 1 id: 1
} }
console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0100 PUBLISH`); console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0100 PUBLISH`);
try{ try{
await notify.publish(notificationRequest, (err) => { await notificationManager.publish(notificationRequest, (err) => {
if (err) { if (err) {
console.info(`${TAG} publish AsyncCallback errCode: ${err.code}, errMes: ${err.message}`) console.info(`${TAG} publish AsyncCallback errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue() expect(false).assertTrue()
...@@ -77,7 +97,7 @@ describe('secondaryDirectoryTest', function () { ...@@ -77,7 +97,7 @@ describe('secondaryDirectoryTest', function () {
it('SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0200', 0, async function (done) { it('SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0200', 0, async function (done) {
console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0200 START`); console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0200 START`);
let longContentText: notify.NotificationLongTextContent = { let longContentText: notificationManager.NotificationLongTextContent = {
title: "test_title", title: "test_title",
text: "test_text", text: "test_text",
additionalText: "test_Publish", additionalText: "test_Publish",
...@@ -86,19 +106,19 @@ describe('secondaryDirectoryTest', function () { ...@@ -86,19 +106,19 @@ describe('secondaryDirectoryTest', function () {
expandedTitle: "expandedTitle123456" expandedTitle: "expandedTitle123456"
} }
let notifyContent: notify.NotificationContent = { let notifyContent: notificationManager.NotificationContent = {
contentType: notify.ContentType.NOTIFICATION_CONTENT_LONG_TEXT, contentType: notificationManager.ContentType.NOTIFICATION_CONTENT_LONG_TEXT,
longText: longContentText longText: longContentText
} }
let notificationRequest : notify.NotificationRequest = { let notificationRequest : notificationManager.NotificationRequest = {
content: notifyContent, content: notifyContent,
id: 2, id: 2,
slotType: notify.SlotType.SERVICE_INFORMATION, slotType: notificationManager.SlotType.SERVICE_INFORMATION,
} }
try{ try{
await notify.publish(notificationRequest, (err) => { await notificationManager.publish(notificationRequest, (err) => {
if (err) { if (err) {
console.info(`${TAG} publish AsyncCallback errCode: ${err.code}, errMes: ${err.message}`) console.info(`${TAG} publish AsyncCallback errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue() expect(false).assertTrue()
...@@ -125,25 +145,25 @@ describe('secondaryDirectoryTest', function () { ...@@ -125,25 +145,25 @@ describe('secondaryDirectoryTest', function () {
it('SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0300', 0, async function (done) { it('SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0300', 0, async function (done) {
console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0300 START`); console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0300 START`);
let basicContent: notify.NotificationBasicContent = { let basicContent: notificationManager.NotificationBasicContent = {
title: "test_title", title: "test_title",
text: "test_text", text: "test_text",
additionalText: "test_Publish" additionalText: "test_Publish"
} }
let notifyContent: notify.NotificationContent = { let notifyContent: notificationManager.NotificationContent = {
contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, contentType: notificationManager.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT,
normal: basicContent normal: basicContent
} }
let notificationRequest : notify.NotificationRequest = { let notificationRequest : notificationManager.NotificationRequest = {
content: notifyContent, content: notifyContent,
id: 3 id: 3
} }
console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0300 PUBLISH`); console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0300 PUBLISH`);
try{ try{
await notify.publish(notificationRequest, (err) => { await notificationManager.publish(notificationRequest, (err) => {
if (err) { if (err) {
console.info(`${TAG} publish AsyncCallback errCode: ${err.code}, errMes: ${err.message}`) console.info(`${TAG} publish AsyncCallback errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue() expect(false).assertTrue()
...@@ -170,7 +190,7 @@ describe('secondaryDirectoryTest', function () { ...@@ -170,7 +190,7 @@ describe('secondaryDirectoryTest', function () {
it('SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0400', 0, async function (done) { it('SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0400', 0, async function (done) {
console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0400 START`); console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0400 START`);
let multiLineContent: notify.NotificationMultiLineContent = { let multiLineContent: notificationManager.NotificationMultiLineContent = {
title: "test_title", title: "test_title",
text: "test_text", text: "test_text",
briefText: "notificationMultiLineContent_title", briefText: "notificationMultiLineContent_title",
...@@ -178,19 +198,19 @@ describe('secondaryDirectoryTest', function () { ...@@ -178,19 +198,19 @@ describe('secondaryDirectoryTest', function () {
lines: ["thrive", "democracy", "civilization", "harmonious"] lines: ["thrive", "democracy", "civilization", "harmonious"]
} }
let notifyContent: notify.NotificationContent = { let notifyContent: notificationManager.NotificationContent = {
contentType: notify.ContentType.NOTIFICATION_CONTENT_MULTILINE, contentType: notificationManager.ContentType.NOTIFICATION_CONTENT_MULTILINE,
multiLine: multiLineContent multiLine: multiLineContent
} }
let notificationRequest : notify.NotificationRequest = { let notificationRequest : notificationManager.NotificationRequest = {
content: notifyContent, content: notifyContent,
id: 4 id: 4
} }
console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0400 PUBLISH`); console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0400 PUBLISH`);
try{ try{
await notify.publish(notificationRequest, (err) => { await notificationManager.publish(notificationRequest, (err) => {
if (err) { if (err) {
console.info(`${TAG} publish AsyncCallback errCode: ${err.code}, errMes: ${err.message}`) console.info(`${TAG} publish AsyncCallback errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue() expect(false).assertTrue()
...@@ -232,27 +252,27 @@ describe('secondaryDirectoryTest', function () { ...@@ -232,27 +252,27 @@ describe('secondaryDirectoryTest', function () {
let wantAgentData = await WantAgent.getWantAgent(agentInfo); let wantAgentData = await WantAgent.getWantAgent(agentInfo);
let basicContent: notify.NotificationBasicContent = { let basicContent: notificationManager.NotificationBasicContent = {
title: "test_title", title: "test_title",
text: "test_text", text: "test_text",
additionalText: "test_Publish" additionalText: "test_Publish"
} }
let notifyContent: notify.NotificationContent = { let notifyContent: notificationManager.NotificationContent = {
contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, contentType: notificationManager.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT,
normal: basicContent normal: basicContent
} }
let userInputContent: notify.NotificationUserInput = { let userInputContent: notificationManager.NotificationUserInput = {
inputKey: 'test_NotificationUserInput', inputKey: 'test_NotificationUserInput',
} }
let actionButton: notify.NotificationActionButton = { let actionButton: notificationManager.NotificationActionButton = {
title:"buttonA", title:"buttonA",
wantAgent: wantAgentData, wantAgent: wantAgentData,
userInput: userInputContent userInput: userInputContent
} }
let notificationRequest : notify.NotificationRequest = { let notificationRequest : notificationManager.NotificationRequest = {
content: notifyContent, content: notifyContent,
actionButtons: [ actionButtons: [
actionButton actionButton
...@@ -262,7 +282,7 @@ describe('secondaryDirectoryTest', function () { ...@@ -262,7 +282,7 @@ describe('secondaryDirectoryTest', function () {
console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0500 PUBLISH`); console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0500 PUBLISH`);
try{ try{
await notify.publish(notificationRequest, (err) => { await notificationManager.publish(notificationRequest, (err) => {
if (err) { if (err) {
console.info(`${TAG} publish AsyncCallback errCode: ${err.code}, errMes: ${err.message}`) console.info(`${TAG} publish AsyncCallback errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue() expect(false).assertTrue()
...@@ -289,17 +309,17 @@ describe('secondaryDirectoryTest', function () { ...@@ -289,17 +309,17 @@ describe('secondaryDirectoryTest', function () {
it('SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0600', 0, async function (done) { it('SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0600', 0, async function (done) {
console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0600 START`); console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0600 START`);
let basicContent: notify.NotificationBasicContent = { let basicContent: notificationManager.NotificationBasicContent = {
title: "test_title", title: "test_title",
text: "test_text", text: "test_text",
additionalText: "test_Publish" additionalText: "test_Publish"
} }
let notifyContent: notify.NotificationContent = { let notifyContent: notificationManager.NotificationContent = {
contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, contentType: notificationManager.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT,
normal: basicContent normal: basicContent
} }
let notifyTemplate: notify.NotificationTemplate = { let notifyTemplate: notificationManager.NotificationTemplate = {
name: 'downloadTemplate', name: 'downloadTemplate',
data: { data: {
title: 'file', title: 'file',
...@@ -308,7 +328,7 @@ describe('secondaryDirectoryTest', function () { ...@@ -308,7 +328,7 @@ describe('secondaryDirectoryTest', function () {
} }
} }
let notificationRequest : notify.NotificationRequest = { let notificationRequest : notificationManager.NotificationRequest = {
content: notifyContent, content: notifyContent,
template: notifyTemplate, template: notifyTemplate,
id: 6 id: 6
...@@ -316,7 +336,7 @@ describe('secondaryDirectoryTest', function () { ...@@ -316,7 +336,7 @@ describe('secondaryDirectoryTest', function () {
console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0600 PUBLISH`); console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0600 PUBLISH`);
try{ try{
await notify.publish(notificationRequest, (err) => { await notificationManager.publish(notificationRequest, (err) => {
if (err) { if (err) {
console.info(`${TAG} publish AsyncCallback errCode: ${err.code}, errMes: ${err.message}`) console.info(`${TAG} publish AsyncCallback errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue() expect(false).assertTrue()
...@@ -343,23 +363,23 @@ describe('secondaryDirectoryTest', function () { ...@@ -343,23 +363,23 @@ describe('secondaryDirectoryTest', function () {
it('SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0700', 0, async function (done) { it('SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0700', 0, async function (done) {
console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0700 START`); console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0700 START`);
let options: notify.DistributedOptions = { let options: notificationManager.DistributedOptions = {
isDistributed: false, isDistributed: false,
supportDisplayDevices: ["0"], supportDisplayDevices: ["0"],
supportOperateDevices: ["0"] supportOperateDevices: ["0"]
} }
let basicContent: notify.NotificationBasicContent = { let basicContent: notificationManager.NotificationBasicContent = {
title: "test_title", title: "test_title",
text: "test_text", text: "test_text",
additionalText: "test_Publish" additionalText: "test_Publish"
} }
let notifyContent: notify.NotificationContent = { let notifyContent: notificationManager.NotificationContent = {
contentType: notify.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT, contentType: notificationManager.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT,
normal: basicContent normal: basicContent
} }
let notificationRequest : notify.NotificationRequest = { let notificationRequest : notificationManager.NotificationRequest = {
content: notifyContent, content: notifyContent,
distributedOption: options, distributedOption: options,
id: 7 id: 7
...@@ -367,7 +387,7 @@ describe('secondaryDirectoryTest', function () { ...@@ -367,7 +387,7 @@ describe('secondaryDirectoryTest', function () {
console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0700 PUBLISH`); console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0700 PUBLISH`);
try{ try{
await notify.publish(notificationRequest, (err) => { await notificationManager.publish(notificationRequest, (err) => {
if (err) { if (err) {
console.info(`${TAG} publish AsyncCallback errCode: ${err.code}, errMes: ${err.message}`) console.info(`${TAG} publish AsyncCallback errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue() expect(false).assertTrue()
...@@ -409,7 +429,7 @@ describe('secondaryDirectoryTest', function () { ...@@ -409,7 +429,7 @@ describe('secondaryDirectoryTest', function () {
await image.createPixelMap(picture_buffer, picture_opts, (err, pixelMap)=>{ await image.createPixelMap(picture_buffer, picture_opts, (err, pixelMap)=>{
console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0800 pixelMap: ${pixelMap}`); console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0800 pixelMap: ${pixelMap}`);
let longContentPicture: notify.NotificationPictureContent = { let longContentPicture: notificationManager.NotificationPictureContent = {
title: "test_title", title: "test_title",
text: "test_text", text: "test_text",
additionalText: "test_Publish", additionalText: "test_Publish",
...@@ -418,19 +438,19 @@ describe('secondaryDirectoryTest', function () { ...@@ -418,19 +438,19 @@ describe('secondaryDirectoryTest', function () {
picture: pixelMap picture: pixelMap
} }
let notifyContent: notify.NotificationContent = { let notifyContent: notificationManager.NotificationContent = {
contentType: notify.ContentType.NOTIFICATION_CONTENT_PICTURE, contentType: notificationManager.ContentType.NOTIFICATION_CONTENT_PICTURE,
picture: longContentPicture picture: longContentPicture
} }
let notificationRequest : notify.NotificationRequest = { let notificationRequest : notificationManager.NotificationRequest = {
content: notifyContent, content: notifyContent,
id: 3 id: 3
} }
console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0800 PUBLISH`); console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0800 PUBLISH`);
try{ try{
notify.publish(notificationRequest, (err) => { notificationManager.publish(notificationRequest, (err) => {
if (err) { if (err) {
console.info(`${TAG} publish AsyncCallback errCode: ${err.code}, errMes: ${err.message}`) console.info(`${TAG} publish AsyncCallback errCode: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue() expect(false).assertTrue()
...@@ -459,16 +479,16 @@ describe('secondaryDirectoryTest', function () { ...@@ -459,16 +479,16 @@ describe('secondaryDirectoryTest', function () {
console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0900 START`); console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_0900 START`);
try{ try{
await notify.addSlot(notify.SlotType.SOCIAL_COMMUNICATION, (err) => { await notificationManager.addSlot(notificationManager.SlotType.SOCIAL_COMMUNICATION, (err) => {
console.info(`${TAG} addSlot success`) console.info(`${TAG} addSlot success`)
if (err) { if (err) {
console.info(`${TAG} addSlot err: ${err.code}, errMes: ${err.message}`) console.info(`${TAG} addSlot err: ${err.code}, errMes: ${err.message}`)
expect(false).assertTrue() expect(false).assertTrue()
done() done()
} else { } else {
notify.getSlots().then((NotificationSlot) => { notificationManager.getSlots().then((NotificationSlot) => {
console.info(`${TAG} getSlots success:` + JSON.stringify(NotificationSlot)) console.info(`${TAG} getSlots success:` + JSON.stringify(NotificationSlot))
expect(NotificationSlot[0].type).assertEqual(notify.SlotType.SOCIAL_COMMUNICATION) expect(NotificationSlot[0].type).assertEqual(notificationManager.SlotType.SOCIAL_COMMUNICATION)
done() done()
}).catch((err) => { }).catch((err) => {
console.info(`${TAG} getSlots failed err: + ${err.code}`) console.info(`${TAG} getSlots failed err: + ${err.code}`)
...@@ -493,7 +513,7 @@ describe('secondaryDirectoryTest', function () { ...@@ -493,7 +513,7 @@ describe('secondaryDirectoryTest', function () {
it('SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_1000', 0, async function (done) { it('SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_1000', 0, async function (done) {
console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_1000 START`); console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_1000 START`);
let bundleOpt: notify.BundleOption = { let bundleOpt: notificationManager.BundleOption = {
bundle: "com.example.secondaryDirectory", bundle: "com.example.secondaryDirectory",
uid: 101001 uid: 101001
} }
...@@ -514,7 +534,7 @@ describe('secondaryDirectoryTest', function () { ...@@ -514,7 +534,7 @@ describe('secondaryDirectoryTest', function () {
it('SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_1100', 0, async function (done) { it('SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_1100', 0, async function (done) {
console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_1100 START`); console.info(`${TAG} SUB_NOTIFICATION_ANS_SECONDARY_DIRECTORY_TEST_1100 START`);
let flags: notify.NotificationFlags = { let flags: notificationManager.NotificationFlags = {
soundEnabled: 1, soundEnabled: 1,
vibrationEnabled: 2 vibrationEnabled: 2
} }
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* limitations under the License. * limitations under the License.
*/ */
import secondaryDirectory from './SecondaryDirectory.test' import ActsNotificationSecondaryDirectoryTest from './ActsNotificationSecondaryDirectoryTest.test'
export default function List() { export default function List() {
secondaryDirectory() ActsNotificationSecondaryDirectoryTest()
} }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册