306 Commits

Author SHA1 Message Date
aonomike
3e7e240392 Refactor it updates disabled test for Comment 2019-09-17 18:59:21 +03:00
aonomike
5c06ba39e2 Refactor moderate Comment tests 2019-09-17 18:46:45 +03:00
aonomike
a6f4362a3f Refactor Moderator spec tp use apollo-server-testing
- Refactor unauthentiacted path for logged in and un logged in user
2019-09-17 15:51:49 +03:00
Robert Schäfer
cb574dd850
Merge pull request #1595 from Human-Connection/1454-security-issue-comment-mutations
Remove deleted/disabled/createdAt from Comment mutations
2019-09-16 18:20:35 +02:00
mattwr18
f66d234e85 Fix lint 2019-09-16 13:41:10 +02:00
mattwr18
70c72e8f95 Remove deleted/disabled/createdAt from Comment mutations 2019-09-16 12:35:14 +02:00
mattwr18
bec629e8ef Fix intermittent failing test
- not concerned about the order of the notification in this test
2019-09-13 20:51:15 +02:00
mattwr18
d1ecac4580 Write tests to ensure createdAt is not deleted on update
- we had a silly serious bug by overwriting all attributes at the time
of UpdatePost
- tests in place to ensure we don't accidentally delete our createdAt
attribute
2019-09-13 20:14:47 +02:00
mattwr18
60c473bb94 Create UpdateComment resolver, update UpdateUser
- UpdateUser should update updatedAt at point of insertion in the
database as well
2019-09-13 20:14:47 +02:00
mattwr18
16d7e6c91a Update notifications
- create only one relationship by using merge, but do not update
createdAt attribute/update test
- order by updatedAt_desc
2019-09-13 20:14:47 +02:00
mattwr18
67d68db231 Update post resolver to fix embarrasing bugs
- when a user updates a post, we should not override every property in
our database with the new params, since we have read-only properties
like createdAt that we don't want to go deleting aimlessly.
2019-09-13 20:14:47 +02:00
mattwr18
ce487f1e0f Set notifications.createdAt only at creation
- we should not be setting it every time a notification is created
2019-09-13 20:14:47 +02:00
roschaefer
2a3e6ad76f Alternative solution for #1494 2019-09-13 20:14:47 +02:00
roschaefer
f3c31aed28 Don't expose termsAndConditionsAgreedAt
1. Don't expose `termsAndConditionsAgreedAt` as input param, because of ..why?
2. Make the `termsAndConditionsAgreedVersion` a *required* input param
   for `SignupVerification`. If new users register, they have to confirm
   the terms and conditions. I added another test to check what happens if
   the user sends `null`.
3. Sorry @ogerly for confusing you with my review here:
   https://github.com/Human-Connection/Human-Connection/pull/1556#pullrequestreview-287516516
   What I meant is that we want to simulate a user with no
   `termsAndConditionsAgreedVersion`. But of course the `variables` must
   have it set when you run the mutations. Now we have the
   exclamation mark in the input param, see point 1 ☝️
2019-09-13 01:11:46 +02:00
Alexander Friedland
8fa42ea6ea
update 2019-09-12 18:51:41 +02:00
Alexander Friedland
0bef3a729c
Update backend/src/schema/resolvers/registration.spec.js
Co-Authored-By: Robert Schäfer <git@roschaefer.de>
2019-09-12 18:00:14 +02:00
Alexander Friedland
aa234edc0a
Update backend/src/schema/resolvers/registration.spec.js
Co-Authored-By: Robert Schäfer <git@roschaefer.de>
2019-09-12 18:00:02 +02:00
ogerly
4b97131225 old stand 2019-09-12 16:37:30 +02:00
Robert Schäfer
a01c73536f
Merge pull request #1542 from Human-Connection/1538_test-filter-by-followed-by
Test filter by followed by
2019-09-11 13:29:00 +02:00
Robert Schäfer
5586a2b5ea
Merge pull request #1512 from Human-Connection/refactor_email_middleware
Refactor email middleware
2019-09-11 01:58:37 +02:00
aonomike
785b59f96e Test filter by followed by 2019-09-10 23:32:55 +03:00
mattwr18
3712a5d2cf
Merge pull request #1513 from Human-Connection/bugfix_about_me_not_saved_on_signup_verification
Bugfix: `about me` not saved on signup
2019-09-10 17:37:22 +02:00
roschaefer
99fe0b001f Fix German signup mail, follow @mattwr18's review
https://github.com/Human-Connection/Human-Connection/pull/1512#pullrequestreview-285968139
2019-09-10 16:24:43 +02:00
roschaefer
22af1399b3 Follow @mattwr18's review 2019-09-10 15:40:10 +02:00
mattwr18
77eb8274f3 Improve English grammar in test descriptions
- Fix typo
- use gender neutral pronoun
- fix third-person conjugation
2019-09-10 15:39:34 +02:00
roschaefer
b656b5aeb9 Check that about actually gets saved 2019-09-10 15:39:34 +02:00
roschaefer
0cd7ac3d32 Refactor slugifyMiddleware
* eliminate GraphQL from spec
* much better error handling
* add EmailAdress factory
2019-09-10 15:39:34 +02:00
mattwr18
2b1590aae1 Add German translation to email template, _ for unused variables 2019-09-10 10:30:17 +02:00
mattwr18
3b056aacc1 Fix weird indentation issue with VS Code 2019-09-09 16:58:49 +02:00
mattwr18
86d80c689c Fix indentation issue on EMOTED 2019-09-09 16:51:24 +02:00
mattwr18
919dc1924f Fix indent issue 2019-09-09 16:46:51 +02:00
mattwr18
b89043166b Add backend tests for filtering posts by emotions
- Co-authored-by: Mike Aono <aonomike@gmail.com>
2019-09-09 16:35:11 +02:00
mattwr18
30ea892aa1 Allow filter by multiple emotions, test getters
- Co-authored-by: vardyb <brent.vardy@challengelogic.net>
- Co-aurhored-by: mike aono <aonomike@gmail.com>
2019-09-07 12:37:03 +02:00
mattwr18
07c58fc03e Add emotions buttons, get it filtering 2019-09-07 12:37:03 +02:00
roschaefer
e751571981 Refactored email resolvers
* If the email middleware does not send mails, it will give a warning
similar to sentry middleware
* Eliminated GrapphQLClient in one more test
* Rename code => nonce
2019-09-06 19:31:03 +02:00
Wolfgang Huß
53be6d41ee
Merge pull request #1507 from Human-Connection/refactor_registration_spec
Refactor registration.spec.js
2019-09-06 16:47:21 +02:00
roschaefer
4358d5bb8f Follow @Tirokk's suggestion
https://github.com/Human-Connection/Human-Connection/pull/1507#pullrequestreview-284841447
2019-09-06 16:03:46 +02:00
roschaefer
5b24a91d45 Implement better statistics resolver 2019-09-06 13:52:56 +02:00
roschaefer
f58c1c7cf0 Refactor registration.spec.js
Only 7 specs left that still use GraphQLClient
2019-09-06 11:37:40 +02:00
mattwr18
4e065325d1
Merge pull request #1480 from Human-Connection/cleanup_unused_code
Remove a lot of unused code, reduce graphql schema
2019-09-05 08:03:39 +02:00
roschaefer
66ed78e19b Remove a lot of unused code, reduce graphql schema 2019-09-05 03:20:32 +02:00
roschaefer
38ea74379a If TAC version is missing, return null 2019-09-05 01:24:51 +02:00
mattwr18
b04649e1ee Remove duplicate code
- there was the same methods in user.js and user_management.js except
that the login was not filtering out deleted users, so it was failing
one test. Reverted changes back to the user.js from the master branch...
added back our changes.

Co-authored-by: Tirokk <wolle.huss@pjannto.com>
Co-authored-by: ogerly <fridolin@tutanota.com>
2019-09-04 19:31:43 +02:00
mattwr18
c92ba35db6 Remove trailing curly brace, update test
Co-authored-by: Tirokk <wolle.huss@pjannto.com>
Co-authored-by: ogerly <fridolin@tutanota.com>
2019-09-04 18:41:48 +02:00
mattwr18
2bf8247ddd Merge branch 'master' of github.com:Human-Connection/Human-Connection into C-1187-terms-and-conditions-confirmed-function 2019-09-04 18:24:02 +02:00
roschaefer
ebf14cbe5c Encode the bearer token instead of hard-coding it
That should fix our build server.
2019-09-04 11:19:18 +02:00
mattwr18
b7b2e6837d Remove unused notifications relationship from User.gql 2019-09-04 10:28:56 +02:00
ogerly
948982682d fails, fails, fails 2019-09-04 10:09:20 +02:00
Alexander Friedland
e618ff005d
Merge branch 'master' into C-1187-terms-and-conditions-confirmed-function 2019-09-04 06:42:40 +02:00
roschaefer
af8475f28e Avoid unavailable posts in relatedContributions 2019-09-03 23:19:55 +02:00