82 Commits

Author SHA1 Message Date
73d0cc4a1c
fix several tests to fit typescript requirements 2023-06-13 14:07:59 +02:00
ebddfa7df4
all files as .ts 2023-06-12 13:25:21 +02:00
Moriz Wahl
1d903798cd ensure that __typename of Post is a known value. labels(resource)[0] may return Article or Event in the case of Post 2023-06-08 16:01:27 +02:00
Moriz Wahl
5f38c74d82 fix flaky test 2023-03-16 16:08:33 +01:00
Moriz Wahl
6adfac1c7b notify user when removed from group 2023-03-16 16:01:46 +01:00
Moriz Wahl
35f3da9984 notify user when role in group changed 2023-03-16 15:31:09 +01:00
Moriz Wahl
a25e6eb326 notify leave group 2023-03-16 15:09:19 +01:00
Moriz Wahl
997dff4dec add related user to notified model 2023-03-15 17:34:16 +01:00
Moriz Wahl
28952567b0 feat(backend): notifications for groups 2023-03-15 15:27:22 +01:00
elweyn
10a22487ef Withdrew helper/jest.js and replace it with graphql-tag 2023-02-23 09:06:41 +01:00
Moriz Wahl
7b3d530023 close neo4j driver at the end of each test suite 2023-02-13 15:31:58 +01:00
Wolfgang Huß
5cd1b95907 Fix templates 'variables' argument 2022-06-23 15:51:36 +02:00
Wolfgang Huß
ce5161f937 Test e-mail templates, remain files, first step 2021-11-18 08:53:31 +01:00
Wolfgang Huß
a836872471 Cleanup 2021-09-27 12:36:58 +02:00
Wolfgang Huß
7ae5593f82 Implement user notifications settings 2021-09-22 14:05:10 +02:00
Wolfgang Huß
5e56473b0e Add note 2021-08-12 07:27:12 +02:00
Wolfgang Huß
f3bf730a12 Refine translated e-mail templates 2021-08-11 14:46:59 +02:00
Wolfgang Huß
7e72a0bf03 Implement sending of first translated templates 2021-08-11 10:29:19 +02:00
Wolfgang Huß
0c8287ab03 Delete test Cypher statement 2021-08-11 07:50:29 +02:00
Wolfgang Huß
5fe07c1133 Implement e-mail notification, first step 2021-08-10 16:13:51 +02:00
Wolfgang Huß
f20643af3b Investigate the graph-ql middleware 2021-08-10 10:56:12 +02:00
Wolfgang Huß
62de9a158e Fix as quick fix for all reminding tests 2021-07-26 11:36:42 +02:00
Wolfgang Huß
7620d9b4da Fix linting to this new prettier 2021-07-20 18:30:43 +02:00
roschaefer
276ea79e8f Update prettier to v2 2020-03-24 21:11:11 +01:00
mattwr18
a346632fff Avoid running cypher statement if not needed
- it just feels safer to not run a cypher statement if there is no user
  in the idsOfUsers array. Why risk notifications pointing to empty
nodes? It doesn't seem like this happens, but I'm not sure how to write
a test to verify, and why run cypher statements, if there is no need to?
2020-02-18 23:19:14 +01:00
mattwr18
54caaaaa0a Remove unnecessary guard clause
- filter returns an empty array, and no notification is created if
  idsOfUsers is an empty array
2020-02-18 22:43:19 +01:00
mattwr18
7fe6fb110b Remove unnecessary negation of negation, refactor
- tests to use `toMatchObject`, which checks that only one notification
  is indeed created
2020-02-18 22:21:49 +01:00
roschaefer
f32bfc7e36 fix(subscriptions): Don't publish undefined
Fix #3088
2020-02-18 16:25:11 +01:00
mattwr18
f16c8b27e7 Merge branch 'master' of github.com:Human-Connection/Human-Connection into 1703-add-vue-apollo-subsriptions 2020-02-10 17:37:34 +01:00
mattwr18
6271b53b30 Set up Subscriptions with RedisPubSub 2020-02-07 14:48:55 +01:00
mattwr18
7ac973f9a1 Refactor cypher statement to simplify
- it's questionable whether this simplifies it or not, and actually adds
  one line of code, but now it looks more similiar to the code in the
notifications query
2020-02-05 20:45:56 +01:00
mattwr18
1c6a5503db Get subscriptions working with notifyUserOfComment
- Co-Authored-By: Tirokk <wolle.huss@pjannto.com>
2020-02-05 19:06:55 +01:00
mattwr18
110165691a Refactor out transformReturnType function
- we have introduced a better way to return all the info we want without
  needing to make multiple database queries. It was introduced by
@roschaefer in the PR for the notifications query, but we hadn't
refactored markAsRead yet.
- Now that we are subscribing to notifications, we need to have the same
  return info as the notification query.

- Co-authored-by: Tirokk <wolle.huss@pjannto.com>
2020-02-05 18:42:31 +01:00
mattwr18
2f43069ea0 Subscribe to notifications/remove polling
- We want to publish when a notification occurs for a specific user, not
  have the client poll the backend for ever user every minute.

- Co-authored-by: @Tirokk <wolle.huss@pjannto.com>
2020-02-05 17:37:38 +01:00
mattwr18
04f0467d2d Merge branch 'master' of github.com:Human-Connection/Human-Connection into 1703-add-vue-apollo-subsriptions 2020-02-05 14:33:57 +01:00
roschaefer
fa0e64b7cb Merge remote-tracking branch 'origin/master' into refactor_factories_with_rosie
There was a single step definition that created a post and a comment. I
would say let's put that in two different steps.
2020-02-01 13:33:07 +01:00
mattwr18
60cd593826 Merge branch 'master' of github.com:Human-Connection/Human-Connection into 1724-block-users 2020-01-30 10:47:50 +01:00
roschaefer
fc367297e3 Get rid of different factory files
..and fix some cypress tests
2020-01-28 23:12:50 +01:00
roschaefer
2a79c53765 Refactor user factory 2020-01-28 22:43:26 +01:00
mattwr18
a28eb8c91f Start subscriptions for notifications 2020-01-24 18:23:59 +01:00
mattwr18
bbb4dd56cd Follow review suggestions/add button to unblock
- @roschaefer gave several suggestions
- we have a button to unblock/unmute users on profile page
2020-01-23 19:18:12 +01:00
roschaefer
b063847849 refactor: Make db:setup init stage of migrate 2020-01-20 11:00:52 +01:00
mattwr18
79d23cc6de Merge branch 'master' of github.com:Human-Connection/Human-Connection into 2412-favor-transaction-function 2019-12-11 10:56:42 +01:00
mattwr18
0e757cf94f Refactor to fix test, DRY out code 2019-12-06 17:48:14 +01:00
mattwr18
da150e0b27 Refactor notificationsMiddleware
- Use transaction functions
- extract validations into validationsMiddleware
- break notifyUsers into notifyUsersOfMention/notifyUsersOfComment
2019-12-06 14:48:32 +01:00
mattwr18
132951c525 Update handleContentDataOfPost to return post
- fix tests, functionality
2019-12-06 13:03:05 +01:00
roschaefer
8f0ce19f09 Implement getDriver() and getNeode() the same way
I want to introduce `neode` and `neo4j-graphql-js` to my students and
saw this.
2019-12-05 21:00:24 +01:00
mattwr18
1827889582 Refactor notificationsMiddleware/locations
- start refactoring
- locations does not have any automated tests, which makes it more
difficult to refactor and have confidence that functionality will not be
broken
- notificationsMiddleware in progress
2019-12-05 20:42:45 +01:00
mattwr18
ace7818eac Update test description
- the test clearly tests that the createdAt doesn't change, we changed
the implementation, but didn't change the test description
2019-12-04 19:56:49 +01:00
roschaefer
132c12a7d3 Close neo4j driver sessions
We had this error in our neo4j pod recently:

```
2019-12-02 08:29:42.680+0000 ERROR Unable to schedule bolt session 'bolt-1018230' for execution since there are no available threads to serve it at the moment. You can retry at a later time or consider increasing max thread pool size for bolt connector(s).
2019-12-02 08:29:42.680+0000 ERROR Unable to schedule bolt session 'bolt-1018224' for execution since there are no available threads to serve it at the moment. You can retry at a later time or consider increasing max thread pool size for bolt connector(s).
2019-12-02 08:29:42.681+0000 ERROR Unable to schedule bolt session 'bolt-1018352' for execution since there are no available threads to serve it at the moment. You can retry at a later time or consider increasing max thread pool size for bolt connector(s).
2019-12-02 08:29:42.682+0000 ERROR Unable to schedule bolt session 'bolt-1018243' for execution since there are no available threads to serve it at the moment. You can retry at a later time or consider increasing max thread pool size for bolt connector(s).
```

Apparently the default is 400 threads. So we must have a leak somewhere.
2019-12-02 18:12:11 +01:00