732 Commits

Author SHA1 Message Date
aonomike
5c06ba39e2 Refactor moderate Comment tests 2019-09-17 18:46:45 +03:00
Alina Beck
e53609ab14 add german translation to signup template 2019-09-17 15:28:24 +01:00
Alina Beck
24fb601739 clean up email template 2019-09-17 15:17:36 +01:00
Alina Beck
f483220590 use nodemailer-html-to-text plugin to transform html content to plain text 2019-09-17 14:27:10 +01: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
Wolfgang Huß
d28a1f17f1 Merge branch '1276-hashtag-links-url-safe' of https://github.com/Human-Connection/Human-Connection into 1276-hashtag-links-url-safe 2019-09-17 10:01:17 +02:00
Wolfgang Huß
b06b353f6a Corrected comment to unicode letter(s) 2019-09-17 09:58:35 +02:00
Vasily Belolapotkov
eeee5f8e9b refactor graphQL queries in follow spec 2019-09-17 10:50:03 +03:00
mattwr18
7926cb39ba Improve English descriptions 2019-09-17 08:50:22 +02:00
roschaefer
431de3319f Make data-hashtag-id authoritive for #links
This adds consistency: The mention links with `@` was implemented
that way already. Instead of parsing the URL, we add some redundancy and
add another attribute: data-hashtag-id

So, what characters are valid for html attributes?
Read: https://stackoverflow.com/questions/925994/what-characters-are-allowed-in-an-html-attribute-name

Thanks to @Tirokk, who added some validations on the hahstag ids, I
think we are all set. If you try to write a hashtag with a `"` double
quotation mark for example, it gets automatically replaced with a valid
hashtag. If someone wants to send us invalid hashtag ids to the backend
directly, the regex there would filter it out.
2019-09-16 23:09:32 +02:00
Wolfgang Huß
15816dd97b Update backend/src/middleware/hashtags/hashtagsMiddleware.spec.js
Co-Authored-By: Robert Schäfer <git@roschaefer.de>
2019-09-16 22:06:36 +02:00
Wolfgang Huß
82d5ac99df Make hashtag links URL safe 2019-09-16 22:06:36 +02:00
Alina Beck
c94715a128 pass options to html template 2019-09-16 18:29:43 +01:00
Alina Beck
dcbeed319d add and style links 2019-09-16 18:16:43 +01: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
Alina Beck
61ce27464c adapt template to follow human connection styleguide (wip) 2019-09-16 17:02:59 +01:00
mattwr18
f66d234e85 Fix lint 2019-09-16 13:41:10 +02:00
Vasily Belolapotkov
9b970dae15 refactor follow resolver spec 2019-09-16 13:54:00 +03: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
ca6ae3bd1b Remove dateTimeMiddleware
- favor adding createdAt, updatedAt attributes at point of insertion to
the database
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
Alexander Friedland
193ac8e6b2
Merge pull request #1556 from Human-Connection/1503_datum_agb
II Add Date to Terms and Conditions #1535
2019-09-13 07:21:19 +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
roschaefer
86f9824c2e Fix lint 2019-09-12 23:13:20 +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
roschaefer
9233049ff3 Show a helpful message only if test fails
Inspired by the `ON FAIL` markup from the previous commit
0f2398295bcced3af3772bb4add1f42472c97893
2019-09-12 17:16:10 +02:00
ogerly
4b97131225 old stand 2019-09-12 16:37:30 +02:00
Wolfgang Huß
0f2398295b Helper message for backend tests failed by missing constraints in database 2019-09-12 11:14:42 +02:00
Alina Beck
58b56754a4 remove console log 2019-09-11 12:51:52 +01:00
Alina Beck
1cd354ff17 paste html template from TedGoas/Cerberus 2019-09-11 12:51:27 +01:00
Alina Beck
f802eab27d copy email text to separate file 2019-09-11 12:44:15 +01: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
ba3e0ca941 Merge branch 'master' of github.com:Human-Connection/Human-Connection into 1488-filter-posts-by-emotion 2019-09-09 16:59:35 +02:00