16 Commits

Author SHA1 Message Date
roschaefer
950df1cd07 Fix frontend tests
I also removed one frontend test. The test case was checking an edge
case. We use `hasMore` as the single source of truth so I think it's
safe to remove this test case.
2019-11-15 16:20:24 +01:00
mattwr18
f8c5290be0 Clean up following @roschaefer PR review suggestions 2019-11-15 15:23:16 +01:00
mattwr18
7ce3e25110 Merge branch 'master' of github.com:Human-Connection/Human-Connection into donation-info 2019-11-12 21:04:54 +01:00
mattwr18
e19990a58b Fix lint 2019-11-12 13:43:51 +01:00
Moriz Wahl
d7397f5e46 posts/currentPosts now return empty array 2019-11-12 11:20:56 +01:00
mattwr18
cbab34e83c Update test with mock $18n.locale
Co-authored-by: @alina-beck <alina.beck@mail.com>
2019-11-12 10:35:02 +01:00
Moriz Wahl
163825e562 Added Empty Definitions For Missing Getters And Mutations 2019-11-11 21:20:53 +01:00
roschaefer
16d07bd3ba refactor: lint, frontend tests, vuex store
This fixes the lint errors and failing frontend tests. Also, when the
user chooses another orderBy, the menu gets translated.

The refactoring moves code and complexity into the vuex store where it
can be tested separately.
2019-10-18 21:58:53 +02:00
aonomike
34ddd12948 Fix test by setting value of the mocked hashtag
- The test wasnt testing anything as the hashtag value was defaulting to null
- Fixed by setting value of hashtag to a string and then testing if the clearSearch works
2019-09-09 16:22:21 +03:00
Matt Rider
2af4151918 Update to use <client-only> instead of <no-ssr> 2019-08-26 17:09:24 +02:00
Robert Schäfer
f5c939472b Fix console.errors in frontend tests
@MoldaB here's how you can register plugins in a frontend test. Pro tip:
You can run `yarn run test --run-in-band` to find out where the
console.errors come from. Jest, by default, runs in parallel which makes
it a little difficult to debug errors that don't fail the test.
2019-08-15 11:08:42 +02:00
Robert Schäfer
0e707cdd4c Massive refactoring
Fix #1231 the filter menu once and for all...
2019-08-10 03:41:38 +02:00
Robert Schäfer
a8cfe96f60 Don't chane the filterPostsMenu with state
@mattwr18 state is the root of all evil
2019-08-09 17:11:55 +02:00
Matt Rider
e08e150742 Fix bug with lost filter when sorting
- add filtered state to vuex, so as to maintain filter
- filter is reset when visiting other pages, so reset the active buttons in the filter posts dropdown
- maybe we want to maintain the filters between page transitions and only clear when the user requests to?
2019-08-06 10:29:16 +02:00
Matt Rider
ec7a5865f7 Update tests, showFilterPostsDropdown only on route 2019-08-02 15:41:19 +02:00
Matt Rider
88a14ebd4f Add tests, fix typo 2019-07-23 10:55:07 -03:00