291 Commits

Author SHA1 Message Date
Matt Rider
d463312397 Get avatar upload working from frontend to backend
- there are several things to work on still
- the upload sets the avatar as the background image of the previewElement, which means that you must refresh the page to upload a different avatar
- the CSS is slightly different before and after successful upload
- the CSS is slightly broken in that the avatar is not in the "ideal" place, it is entirely inside the card, instead of half in, half out on the top
2019-05-20 16:37:02 -03:00
Robert Schäfer
4dbf1b2a2c UpdateUser with avatarUpload
This is a curl request from a folder where I have a file `avatar.jpg`:

```
curl localhost:4000/ \
  -F operations='{ "query": "mutation($id: ID!, $file: Upload) { UpdateUser(id: $id, avatarUpload: $file) { id name avatar } }", "variables": { "id": "u3", "file": null } }' \
  -F map='{ "0": ["variables.file"] }' \
  -F 0=@avatar.jpg
```

It uploads the avatar to the public folder. We should

* Write tests
* Change the `user.avatar` url and send it to `/api` in the frontend
2019-05-20 20:35:33 +02:00
Robert Schäfer
45694b0f89
Merge pull request #617 from Human-Connection/dependabot/npm_and_yarn/backend/node-fetch-2.6.0
Bump node-fetch from 2.5.0 to 2.6.0 in /backend
2019-05-17 22:41:15 +02:00
dependabot[bot]
4bc6363eff
Bump express from 4.16.4 to 4.17.0 in /backend
Bumps [express](https://github.com/expressjs/express) from 4.16.4 to 4.17.0.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.16.4...4.17.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-17 04:48:14 +00:00
dependabot[bot]
f0272ef8ed
Bump node-fetch from 2.5.0 to 2.6.0 in /backend
Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.5.0 to 2.6.0.
- [Release notes](https://github.com/bitinn/node-fetch/releases)
- [Changelog](https://github.com/bitinn/node-fetch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bitinn/node-fetch/compare/v2.5.0...v2.6.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-17 04:47:39 +00:00
dependabot[bot]
45c64db90f
Bump neo4j-graphql-js from 2.4.2 to 2.6.0 in /backend
Bumps [neo4j-graphql-js](https://github.com/neo4j-graphql/neo4j-graphql-js) from 2.4.2 to 2.6.0.
- [Release notes](https://github.com/neo4j-graphql/neo4j-graphql-js/releases)
- [Changelog](https://github.com/neo4j-graphql/neo4j-graphql-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/neo4j-graphql/neo4j-graphql-js/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-14 21:15:12 +00:00
eb995d6ad4
Merge pull request #596 from Human-Connection/refactoring_validation_middleware
Refactoring validation middleware
2019-05-14 12:02:59 +02:00
Robert Schäfer
2d1daee23a Don't document that we can set IDs in mutations 2019-05-13 12:44:47 +02:00
mattwr18
f724b483c0
Merge pull request #567 from Human-Connection/dependabot/npm_and_yarn/backend/apollo-server-testing-2.5.0
Bump apollo-server-testing from 2.4.8 to 2.5.0 in /backend
2019-05-10 21:01:18 -03:00
Matt Rider
a6cc634218 Merge branch 'master' of github.com:Human-Connection/Human-Connection into dependabot/npm_and_yarn/backend/apollo-server-testing-2.5.0 2019-05-10 14:09:43 -03:00
Matt Rider
595887d582 Merge branch 'master' of github.com:Human-Connection/Human-Connection into dependabot/npm_and_yarn/backend/graphql-14.3.0 2019-05-10 14:08:47 -03:00
Robert Schäfer
81a26e14ff Fix test case, move spec to the right location
@ulfgebhardt: The reason why the test case was failing is pretty
obvious. You forgot to create a user that you want to update. If there
is no user to update, then you get an empty response.

@ulfgebhardt: I moved the spec also in the right directory. You're
testing resolvers, so that's where I moved the `.spec` file.
2019-05-10 17:34:05 +02:00
Robert Schäfer
47d7c615a5 Refactoring: Put all data validations in one place
@ulfgebhardt @mattwr18 @tirokk

Here's how I imagined the data validation middleware. If we roll our own
input validations I would suggest to put them all in one place.

@ulfgebhardt this commit is a great example of how tests can speed you
up: Since I can rely on existing tests, I don't have to check the validations
manually. With tests you can refactor with confidence! 👍
2019-05-10 17:13:54 +02:00
82570bef7f
Merge pull request #478 from Human-Connection/2019/kw15/User_can_change_its_username_to_emptystring
2019/kw15/user can change its username to emptystring
2019-05-09 15:01:54 +02:00
2cb8d793fb
removed failing test 2019-05-09 14:37:42 +02:00
Wolfgang Huß
46d3dc8588 Merge branch 'master' of https://github.com/Human-Connection/Human-Connection into 463-delete-socialMedia 2019-05-09 08:43:11 +02:00
7983a93fbd
Merge branch 'master' into 2019/kw15/User_can_change_its_username_to_emptystring 2019-05-09 08:26:53 +02:00
d6f423d845
Merge pull request #574 from Human-Connection/2019/kw19/codecov
2019/kw19/codecov
2019-05-08 23:55:20 +02:00
00d5c4fde5
ignore dist folder 2019-05-08 22:58:00 +02:00
63b7ded4b6
ignore test modules in coverage estimation 2019-05-08 22:42:33 +02:00
466a9584ea
backend test pattern 2019-05-08 20:43:13 +02:00
28c44f2781
corrected testMatch pattern, fixed backend coverage collection (?) 2019-05-08 20:16:18 +02:00
900dfb9693
renabled tests - it seems like the reports do not work very well 2019-05-08 20:04:55 +02:00
ec9b3607d8
compute coverage over all code 2019-05-08 19:52:04 +02:00
4092a8873b
overall coverage seems not to be reported..., removed parts of tests not the whole thing 2019-05-08 19:38:01 +02:00
12ec2b8683
fixed codecov report layout, disabled tests in front- & backend for testing - should fail 2019-05-08 19:13:09 +02:00
dependabot[bot]
13ed5024dd
Bump apollo-server-testing from 2.4.8 to 2.5.0 in /backend
Bumps [apollo-server-testing](https://github.com/apollographql/apollo-server) from 2.4.8 to 2.5.0.
- [Release notes](https://github.com/apollographql/apollo-server/releases)
- [Changelog](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/apollographql/apollo-server/compare/apollo-server-testing@2.4.8...apollo-server-testing@2.5.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-08 12:28:11 +00:00
dependabot[bot]
a07c4d15d7
Bump graphql from 14.2.1 to 14.3.0 in /backend
Bumps [graphql](https://github.com/graphql/graphql-js) from 14.2.1 to 14.3.0.
- [Release notes](https://github.com/graphql/graphql-js/releases)
- [Commits](https://github.com/graphql/graphql-js/compare/v14.2.1...v14.3.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-08 12:28:05 +00:00
Wolfgang Huß
0ffbe567c7 Merge branch 'master' of https://github.com/Human-Connection/Human-Connection into 463-delete-socialMedia 2019-05-08 08:54:11 +02:00
dependabot[bot]
cf9799fb18
Bump apollo-server from 2.4.8 to 2.5.0 in /backend
Bumps [apollo-server](https://github.com/apollographql/apollo-server) from 2.4.8 to 2.5.0.
- [Release notes](https://github.com/apollographql/apollo-server/releases)
- [Changelog](https://github.com/apollographql/apollo-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/apollographql/apollo-server/compare/apollo-server@2.4.8...apollo-server@2.5.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-08 04:54:22 +00:00
Robert Schäfer
099a5c9cf4 Remove obsolete docker-compose files
Since we moved to a monorepo, we have it in the top level folder.
2019-05-07 19:24:59 +02:00
dependabot[bot]
cce81a5ec0
Bump jest from 24.7.1 to 24.8.0 in /backend
Bumps [jest](https://github.com/facebook/jest) from 24.7.1 to 24.8.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v24.7.1...v24.8.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-07 12:25:10 +00:00
Robert Schäfer
9ff8b34840
Merge pull request #543 from Human-Connection/dependabot/npm_and_yarn/backend/eslint-plugin-node-9.0.1
Bump eslint-plugin-node from 8.0.1 to 9.0.1 in /backend
2019-05-07 14:23:14 +02:00
Robert Schäfer
287a55db9f Remove test case entirely
@ulfgebhardt when I write "Remove test case" I mean indeed removing all
the lines of code of that test case, not only disabling it. Commenting
out code *and pushing it to version control* is a strong anti-pattern. Why?
First, code comments get out of date quickly. "Never trust code comments".
Second: In our example here, it creates anxiety because other contributors might
believe there was a reason why the commented code exists.

Read:
* https://blog.codinghorror.com/coding-without-comments/
* https://www.nayuki.io/page/dont-share-commented-out-code
* https://softwareengineering.stackexchange.com/questions/1/comments-are-a-code-smell
2019-05-07 14:10:12 +02:00
Robert Schäfer
0637d97648 Merge remote-tracking branch 'origin/master' into 2019/kw15/User_can_change_its_username_to_emptystring 2019-05-07 14:09:10 +02:00
3d2ce3960c
added url of conversation 2019-05-07 14:01:43 +02:00
Robert Schäfer
be10691ed5
Merge pull request #547 from Human-Connection/dependabot/npm_and_yarn/backend/babel-jest-24.8.0
Bump babel-jest from 24.7.1 to 24.8.0 in /backend
2019-05-07 14:01:17 +02:00
140ba848c7
removed testcase, added todo 2019-05-07 14:00:02 +02:00
dependabot[bot]
0572d122fb
Bump eslint-plugin-node from 8.0.1 to 9.0.1 in /backend
Bumps [eslint-plugin-node](https://github.com/mysticatea/eslint-plugin-node) from 8.0.1 to 9.0.1.
- [Release notes](https://github.com/mysticatea/eslint-plugin-node/releases)
- [Commits](https://github.com/mysticatea/eslint-plugin-node/compare/v8.0.1...v9.0.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-07 10:47:31 +00:00
dependabot[bot]
264ba2aaf7
Bump babel-jest from 24.7.1 to 24.8.0 in /backend
Bumps [babel-jest](https://github.com/facebook/jest/tree/HEAD/packages/babel-jest) from 24.7.1 to 24.8.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v24.8.0/packages/babel-jest)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-07 10:47:20 +00:00
dependabot[bot]
db1c22d92e
Bump dotenv from 7.0.0 to 8.0.0 in /backend
Bumps [dotenv](https://github.com/motdotla/dotenv) from 7.0.0 to 8.0.0.
- [Release notes](https://github.com/motdotla/dotenv/releases)
- [Changelog](https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md)
- [Commits](https://github.com/motdotla/dotenv/compare/v7.0.0...v8.0.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-07 10:46:24 +00:00
Robert Schäfer
b8cecd7fe3
Merge pull request #536 from Human-Connection/352-add-authorship-to-comments
Add authorship to comments at creation
2019-05-07 12:03:29 +02:00
dependabot[bot]
42016178c5
Bump node-fetch from 2.4.1 to 2.5.0 in /backend
Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.4.1 to 2.5.0.
- [Release notes](https://github.com/bitinn/node-fetch/releases)
- [Changelog](https://github.com/bitinn/node-fetch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bitinn/node-fetch/compare/v2.4.1...v2.5.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-06 23:42:06 +00:00
Robert Schäfer
9c826f868d
Merge pull request #546 from Human-Connection/dependabot/npm_and_yarn/backend/helmet-3.18.0
Bump helmet from 3.16.0 to 3.18.0 in /backend
2019-05-07 01:38:33 +02:00
Robert Schäfer
d0765f82c4
Merge pull request #504 from Human-Connection/469-add-coveralls
Add test coverage
2019-05-07 00:05:32 +02:00
dependabot[bot]
1ef1b7ef3d
Bump helmet from 3.16.0 to 3.18.0 in /backend
Bumps [helmet](https://github.com/helmetjs/helmet) from 3.16.0 to 3.18.0.
- [Release notes](https://github.com/helmetjs/helmet/releases)
- [Changelog](https://github.com/helmetjs/helmet/blob/master/CHANGELOG.md)
- [Commits](https://github.com/helmetjs/helmet/compare/v3.16.0...v3.18.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-06 21:07:42 +00:00
Robert Schäfer
b58ffc058f
Merge pull request #532 from Human-Connection/dependabot/npm_and_yarn/backend/nodemon-1.19.0
Bump nodemon from 1.18.11 to 1.19.0 in /backend
2019-05-06 23:06:23 +02:00
Robert Schäfer
7efa95b502
Merge pull request #539 from Human-Connection/dependabot/npm_and_yarn/backend/graphql-shield-5.3.5
Bump graphql-shield from 5.3.4 to 5.3.5 in /backend
2019-05-06 23:05:55 +02:00
Robert Schäfer
ad111f5701 Double-check changed expectations, fix tests
See:
https://github.com/Human-Connection/Human-Connection/pull/478/files#r281267486

> We found the reason for it: If you have an exclamation mark in the schema e.g.
> email! and the response would e.g. expect the email for each User object, and
> the server does not have an email for the client, then the entire User object
> gets nullified.
2019-05-06 19:26:53 +02:00
Wolfgang Huß
41711c316a Get delete SocialMedia to work, refactored Frontend Jest tests, written Cypress tests
Optimised tests and Vue for add Social Media a bit.
Added localisation.

Finished this commit together with @mattwr18 !!!
Thank you so much dude! You did great stuff …
2019-05-06 17:31:02 +02:00