Skip to content

Commit

Permalink
fix: Merge branch 'main' into deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammeds1992 committed Nov 28, 2023
2 parents 39ab6be + 9e2a41e commit f4cea93
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -693,8 +693,6 @@ export class PushNotificationBaseClass {
BOOLEAN_TYPE +
SETTING_DELIMITER +
ele.default;
notificationSettingDescription =
notificationSettingDescription + SETTING_SEPARATOR + ele.description;
}
if (ele.type == SLIDER_TYPE) {
if (ele.data) {
Expand All @@ -717,11 +715,6 @@ export class PushNotificationBaseClass {
ele.data.upper +
SETTING_DELIMITER +
ticker;

notificationSettingDescription =
notificationSettingDescription +
SETTING_SEPARATOR +
ele.description;
}
}
if (ele.type == RANGE_TYPE) {
Expand Down Expand Up @@ -749,6 +742,9 @@ export class PushNotificationBaseClass {
ticker;
}
}

notificationSettingDescription =
notificationSettingDescription + SETTING_SEPARATOR + ele.description;
}
return {
setting: notificationSetting.replace(/^\+/, ''),
Expand Down
43 changes: 39 additions & 4 deletions packages/restapi/tests/lib/pushNotification/channel.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,13 +380,48 @@ describe('PushAPI.channel functionality', () => {
describe('channel :: settings', () => {
it('Should create channel', async () => {
const res = await userKate.channel.setting([
{
type: 1,
default: 1,
description: 'test1',
},
{
type: 2,
default: 5,
description: 'My notif setting 2',
data: { upper: 100, lower: 5, ticker: 10, enabled: true },
default: 10,
description: 'test2',
data: {
upper: 100,
lower: 1,
},
},
{
type: 3,
default: {
lower: 10,
upper: 50,
},
description: 'test3',
data: {
upper: 100,
lower: 1,
enabled: true,
ticker: 2,
},
},
{
type: 3,
default: {
lower: 3,
upper: 5,
},
description: 'test4',
data: {
upper: 100,
lower: 1,
enabled: false,
ticker: 2,
},
},
{ type: 1, default: 1, description: 'My Notif Settings' },
]);
// console.log(res)
expect(res).not.null;
Expand Down

0 comments on commit f4cea93

Please sign in to comment.