1
0
mirror of https://github.com/chylex/Nextcloud-News.git synced 2024-11-24 13:42:47 +01:00
Commit Graph

6863 Commits

Author SHA1 Message Date
Marco Nassabain
525c47bd01 📝 Update CHANGELOG and AUTHORS
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
4a7e092b98 🔥 Remove front-end edit from back-end pr
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
a1edb03e19 🔥 Remove changes from front-end for back-end pr
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
f708e40b75 ✏️ Fix share test name typo
- testFindAllShared => testFindAllSharedWithUser

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
WENDLING NICOLAS
f6014567f3 🗑 '!=' is discouraged, replaced by '!=='
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
WENDLING NICOLAS
a9863ec5f7 🗑 '!=' is discouraged, replaced by '!=='
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
80dec257c2 Update find shared items tests
- testFindAllSharedWithUser
- testFindAllSharedWithUserHideRead
- testFindAllSharedWithUserSearch

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
af02560363 🎨 ItemMapperV2: add new offset code (findShared)
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
8de50d44b6 ItemMapperPaginatedTest: update tests
Adapted folder/feed/item tests to take account for shared data
- testFindAllItemsStarredSearch
- testFindAllFeed
- testFindAllFeedInverted
- testFindAllFeedHideRead
- testFindAllFeedSearch
- testFindAllFolderIdNull
- testFindAllFolderHideRead
- testFindAllFolderHideReadInvertOrder
- testFindAllFolderSearchId

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
WENDLING NICOLAS
ee49a1d1cc Fix tests in ItemMapperPaginatedTest:
- testFindAllItemsInvalid
- testFindAllItemsFullInverted
- testFindAllItemsUnread
- testFindAllItemsStarred

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
WENDLING NICOLAS
abba7386ee Fix tests in ItemMapperAfterTest:
- testFindAllAfterStarred
- testFindAllAfterAll
- testFindAllAfterInvalid

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
WENDLING NICOLAS
6dbf64fa9d Fix tests in ItemMapperAfterTest:
- testFindAllInFeedAfter
- testFindAllInFeedAfterHideRead
- testFindAllInFolderAfter
- testFindAllInFolderAfterHideRead
- testFindAllAfterUnread

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
702d611f35 🔀 Resolving merge: moving shared tests
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
85dbed9ffa 🧹 Cleanup test files: added new lines
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
WENDLING NICOLAS
604f64c30c 🚨 Fix linter in those classes:
- ItemController
- ItemMapperV2
- ItemServicev2

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
WENDLING NICOLAS
376f866a83 Fix those tests -> ItemControllerTest:
-  testIndexForFeed
- testIndexForFolder
- testIndexForShared
- testIndexForOther
- testIndexSearchFeed
- testNewItemsFeed
- testNewItemsFolder
- testNewItemsShared
- testNewItemsOther

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Aurélien
dd4617d368 Fix findFromUser, testFindAllFromUserWithParams, testFindAllFromUser
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Aurélien
5a12e50cca Fix testFindForUserByGUIDHash
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
WENDLING NICOLAS
890b8fa1df Fix FeedControllerTest tests
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Aurélien
2c59331316 Fix testNewest
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Aurélien
306f97d656 Fix tests testFindAllInFolderAfterHideRead, testFindAllInFolderAfter, testFindAllInFeedAfterHideRead, testFindAllInFeedAfter
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Aurélien
6775fe541e Fix testFindAllItemsStarredSearch, testFindAllItemsStarred, testFindAllItemsUnread
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Aurélien
e7ec222c1d Fix testFindAllItemsInvalid, testFindAllAfterInvalid, testFindAllAfterStarred, testFindAllAfterUnread
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Aurélien
d6b32cf674 fix test findAllFeed
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Aurélien
d314e8b495 Fix test findAllFeedSearch and findAllFeedHideRead
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Aurélien
f59fe96105 Fix test findAllFolderIdNull and findAllFolderHideRead
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Aurélien
319b15a655 Fix test findAllFolderHideReadInvertOrder
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Aurélien
8b51ee583e Fix test FindAllFolderSearchId
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Aurélien
818736c2be fix test readAll
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
fc8670f5be ItemMapperTest: add tests for findAllSharedAfter
- testFindAllSharedAfter
- testFindAllSharedAfterHideRead

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
cbe1ca6b4d ItemMapperTest: test findAllSharedWithUser func
- testFindAllSharedWithUser
- testFindAllSharedWithUserHideRead
- testFindAllSharedWithUserSearch

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
5c359a8d42 ItemServiceTest: test share functions
- testFindAllShared
- testFindAllNewShared
- testSharedCount

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
14c6685344 ItemServiceTest: test share function
- testShare
- testShareDoesNotExist

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
75e81d5e0b 🥅 ItemService: catch NotFoundException + cleanup
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
46cc069863 ItemControllerTest: added share tests (WIP)
- testIndexForShared
- testNewItemShared

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
ceefee0d3e 🗃 Change share migration version
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
91c034c72f Fix ItemController share tests
- testShare
- testShareDoesNotExist

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
88fc165f49 🔥 Remove old ItemMapper & ItemService
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
df8680b14a 🩹 Remove traces of feed_id being nullable
- feed_id is not nullable so we remove default values

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
08982fc540 Add findAllSharedAfter
- adapted Controller, Service and Mapper (newItems)

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
0f6ec7c99c Implementer shared getter + add count in request
- ItemServiceV2: added sharedWithUser - returns unread shared items
- ItemController & FeedController - returning shared count

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
7e1a0b47cf ItemController (index): add case for shared items
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
d63e999d93 ItemServiceV2: add findAllSharedWithUserWithFilters
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
1f0924fb57 ItemMapperV2: exclude shared items in functions
updated the following functions to exclude shared_items:
- findAllInFeedAfter
- findAllInFolderAfter
- findAllFeed
- findAllFolder

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
26ae92bc7b ItemMapperV2: include shared in functions
updated the following functions to include shared items:
- findFromUser
- findForUserByGuidHash
- readAll
- findAllAfter
- findAllItems

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
83bdbc08a0 ItemMapperV2: include shared in functions
updated the following functions to include shared items:
- findAllFromUser
- newest

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
c3cc70b15e ItemMapperV2: added findAllSharedWithUser funct
- return all items shared with a given user

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
907e764749 🚧 ItemService, Controller: added basic sharing
- TODO: check if relation already exists

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
237363e087 💡 Added comments to ItemMapper share fncts
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00
Marco Nassabain
89d7293e84 Add tests: testFindAllShared, testShare + ...
+ testShareDoesNotExist

Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
2021-04-08 22:31:21 +02:00