aboutsummaryrefslogtreecommitdiff
path: root/test/unit/specs/services/notification_utils/notification_utils.spec.js
diff options
context:
space:
mode:
authorHJ <30-hj@users.noreply.git.pleroma.social>2023-12-13 22:20:59 +0000
committerHJ <30-hj@users.noreply.git.pleroma.social>2023-12-13 22:20:59 +0000
commit2b41c1cfe86cba814aba98da14d70ac1c09f422f (patch)
treeb90119b33d0d9cbcccc9193809864fe630020bf6 /test/unit/specs/services/notification_utils/notification_utils.spec.js
parenta98e241a815a95a2a7dd073aec8a993719037dcc (diff)
parent55ed65331fb5e53374a0be6710896c383e34d120 (diff)
Merge branch 'notifications-thru-sw' into 'develop'
Notifications improvements. See merge request pleroma/pleroma-fe!1873
Diffstat (limited to 'test/unit/specs/services/notification_utils/notification_utils.spec.js')
-rw-r--r--test/unit/specs/services/notification_utils/notification_utils.spec.js78
1 files changed, 39 insertions, 39 deletions
diff --git a/test/unit/specs/services/notification_utils/notification_utils.spec.js b/test/unit/specs/services/notification_utils/notification_utils.spec.js
index 00628d83..60db7380 100644
--- a/test/unit/specs/services/notification_utils/notification_utils.spec.js
+++ b/test/unit/specs/services/notification_utils/notification_utils.spec.js
@@ -5,28 +5,28 @@ describe('NotificationUtils', () => {
it('should return sorted notifications with configured types', () => {
const store = {
state: {
- statuses: {
- notifications: {
- data: [
- {
- id: 1,
- action: { id: '1' },
- type: 'like'
- },
- {
- id: 2,
- action: { id: '2' },
- type: 'mention'
- },
- {
- id: 3,
- action: { id: '3' },
- type: 'repeat'
- }
- ]
- }
- },
- config: {
+ notifications: {
+ data: [
+ {
+ id: 1,
+ action: { id: '1' },
+ type: 'like'
+ },
+ {
+ id: 2,
+ action: { id: '2' },
+ type: 'mention'
+ },
+ {
+ id: 3,
+ action: { id: '3' },
+ type: 'repeat'
+ }
+ ]
+ }
+ },
+ getters: {
+ mergedConfig: {
notificationVisibility: {
likes: true,
repeats: true,
@@ -55,23 +55,23 @@ describe('NotificationUtils', () => {
it('should return only notifications not marked as seen', () => {
const store = {
state: {
- statuses: {
- notifications: {
- data: [
- {
- action: { id: '1' },
- type: 'like',
- seen: false
- },
- {
- action: { id: '2' },
- type: 'mention',
- seen: true
- }
- ]
- }
- },
- config: {
+ notifications: {
+ data: [
+ {
+ action: { id: '1' },
+ type: 'like',
+ seen: false
+ },
+ {
+ action: { id: '2' },
+ type: 'mention',
+ seen: true
+ }
+ ]
+ }
+ },
+ getters: {
+ mergedConfig: {
notificationVisibility: {
likes: true,
repeats: true,