86 Commits

Author SHA1 Message Date
elweyn
5544f453a6 Backend removed eventLocation, frontend fixes 2023-05-17 22:12:08 +02:00
Moriz Wahl
71d8d4f0b4 fix(backend): recover missing changes 2023-04-25 19:02:01 +02:00
Moriz Wahl
b13325659d remove changes from other branch 2023-04-20 13:40:16 +02:00
Moriz Wahl
8c0a833d0b feat(backend): further event params 2023-04-19 09:09:08 +02:00
Moriz Wahl
2a8a993ff8 updatePost with event type 2023-03-30 15:03:21 +02:00
Moriz Wahl
0c225715fa test create post with event properties 2023-03-30 14:43:25 +02:00
Moriz Wahl
f00b36b99e update posts with post type parameter 2023-03-29 17:36:36 +02:00
Moriz Wahl
2c52d08a94 test update posts for categories again 2023-03-29 17:26:15 +02:00
Moriz Wahl
0f7c2d014c refactor test for update post: user createPost mutation instead of factory. Porblem: Imagesgit add .! 2023-03-29 17:10:21 +02:00
Moriz Wahl
2b43041fe4 test postType=Article for createPost and move createPostMutation to graphql folder 2023-03-29 16:54:57 +02:00
Moriz Wahl
507fa4c352 test default label Article for postType property on create post 2023-03-29 16:36:08 +02: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ß
b82dcd45aa Add a missing await in 'posts.spec.js' 2022-09-02 05:35:52 +02:00
Tima Gixe
15ce070288 Update tests to expect Not Authorized! 2022-08-25 09:08:14 +03: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
cba299827d
lint fixes backend 2021-04-12 13:24:52 +02:00
99e75066f9
fixed backend unit tests 2021-04-12 13:24:52 +02:00
Moriz Wahl
250d231a74
auto detect language. Input field in contribution form removed. 2021-01-21 13:30:56 +01:00
Robert Schäfer
512ef672bf
feat: Introduce graphql image type (#3043)
* refactor(graphql): Introduce image type

* Undo changes to .travis.yml

* chore: Upgrade travis to node LTS

- URL is available since v10

* chore: use lts

Co-authored-by: mattwr18 <mattwr18@gmail.com>
2020-03-16 15:32:19 +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
roschaefer
fc367297e3 Get rid of different factory files
..and fix some cypress tests
2020-01-28 23:12:50 +01:00
roschaefer
2fc71d75a5 Refactor factory for comments 2020-01-28 22:43:27 +01:00
roschaefer
95bfb090fd Refactor factory for posts 2020-01-28 22:43:26 +01:00
roschaefer
2a79c53765 Refactor user factory 2020-01-28 22:43:26 +01:00
mattwr18
f8f62cc71f Merge branch 'master' of github.com:Human-Connection/Human-Connection into neo4j_data_migrations 2020-01-23 20:42:44 +01:00
Mike Aono
d49afc25cf test(cypress): Cover "Pinned post" feature
* Implement cypress tests

- Start implementation of cypress tests for pinned posts

* Test that Admin can pin a post

- Tests the process of an admin pinning a post

* Resolve failing tests

- Fix ordering of posts immediately after pinning posts by reloading page
- Check that tests are pinned posts are displayed first for role user

* Refactor to seperate the initialization

- Of the post data created in the database during setup

* Fix toaster test

* test(cypress): Add missing parts for pin feature

* docs(cucumber): Link to admin 🥒 folder

* Follow @mattwr18's suggestions

* test(backend): Order pinned posts like frontend

@mattwr18 I think this was a false negative.

Co-authored-by: Robert Schäfer <git@roschaefer.de>
2020-01-23 20:30:12 +01:00
roschaefer
b063847849 refactor: Make db:setup init stage of migrate 2020-01-20 11:00:52 +01:00
mattwr18
ca9c58c06b Add errors undefined to tests
- helps with debugging
2019-12-11 12:50:46 +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
b3640659bb Add missing unit tests/refactor code
- Refactoring without tests makes it riskier
- Move some tests from resolver to middleware unit tests to live closer
to where the validation happens, remove duplicate tests
- DRY out code
2019-12-03 17:59:59 +01:00
Robert Schäfer
9a985d464c
Merge pull request #2257 from Human-Connection/bump_metascraper_modules
build(deps): bump metascraper modules
2019-11-18 22:00:26 +01:00
roschaefer
978347ba7b Tell github-linguists to ignore snapshots 2019-11-16 20:09:05 +01:00
roschaefer
034a353367 Hard-code graphql schema
Apparently, `neo4j-graphql-js` *replaces* the schema partly. When we use
join models like `EMOTED`, `neo4j-graphql-js` puts in a join model with
the two names of the connected types.
2019-11-15 11:04:07 +01:00
roschaefer
2a9e182649 fix: performance issue with ordering
@mattwr18 @aonomike
You must never `ORDER BY` a property with a `@cypher` directive. Reason:
The order by performance will be terribly poor.

See my issue:
https://github.com/neo4j-graphql/neo4j-graphql-js/issues/239
And my PR:
https://github.com/neo4j-graphql/neo4j-graphql-js/pull/247
2019-10-22 20:00:12 +02:00
mattwr18
8872dc16cf Follow @Tirokk's PR review suggestions
- add type :User to match
- remove unneeded outdated pinPost
2019-10-18 18:27:20 +02:00
mattwr18
9f70012556 Fix lint 2019-10-18 15:55:47 +02:00
mattwr18
be0c8044e8 Return pinnedAt date from pinPost resolver/clean up
- it's good to return the pinnedAt date for ordering
- move test to a better describe block
- remove unneeded outdated variables from graphql/PostQuery UpdatePost
- fix indentation in Post.gql
- fix pinnedAt to return pinned.createdAt, not post.createdAt

Co-authored-by: Mike Aono <aonomike@gmail.com>
2019-10-18 15:10:26 +02:00
mattwr18
8b27250393 Fix vue warning webapp, try to find source of cypress failure
- clean up
2019-10-17 22:44:44 +02:00
mattwr18
973912fb87 Add tests for unpinPost, refactor
- following @roschaefer's PR review suggestions
- simplify UpdatePost by using pinPost/unpinPost
- did not remove filtering because attempting to have two queries caused
problems as well to do with duplicate records, etc... and it's working
now
2019-10-17 21:51:41 +02:00
mattwr18
dd55d11739 Add backend test for PostOrdering 2019-10-17 17:56:16 +02:00
mattwr18
f1243c6df0 Add createdAt attribute to PINNED and test 2019-10-17 17:56:16 +02:00
mattwr18
0007533b8c Add tests that admin can pin anyone's post/limit 1 pinned post 2019-10-17 17:56:16 +02:00
mattwr18
64f9d02c1a Start refactoring backend to pin posts on update
- we want to give the admins the ability to create posts, then pin them
later, or pin other admins posts, etc...
2019-10-17 17:56:15 +02:00
aonomike
56d88d6e84 Resolve failing test 2019-10-17 17:56:15 +02:00
aonomike
ab06e8a91f Add relationship for pinned posts and user
- The CreateUser mutation now returns the user who pinned a post and so we can see the user who pinned the post
2019-10-17 17:56:15 +02:00
mattwr18
774581f2e0 Allow admins to create a post as pinned
- at the moment, it is created as a property of Post, but will be
refactored to create a relationship[:PINNED] from the admin to the Post

- Co-authored-by: kachulio1 <jngugi88@gmail.com>
2019-10-17 17:56: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
aonomike
785b59f96e Test filter by followed by 2019-09-10 23:32:55 +03:00