11 Commits

Author SHA1 Message Date
Moriz Wahl
a3178a91b4
refactor(webapp): store for categories (#8551)
* after authentification, query the categories if active and store them

* get categories from store

* use category store to get categories

* get categories from store

* mock store to have access to categories

* to get rid of the active categories config variable in the frontend, the Category query returns an empty array when categories are not active

* remove CATEGORIES_ACTIVE from .env

* should return string to avoid warnings in console

* replace all env calls for categories active by getter from store

* use categoriesActive getter

* ignore order of returned categories

* mixin to get the category infos from the store, to ensure, that the quey has been called

* fix misspelling

---------

Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com>
2025-05-27 15:03:26 +02:00
mahula
7480f2c523 replace deprecated jest methods in webapp unit tests 2023-10-31 11:10:38 +01:00
Moriz Wahl
e3eaaf4435 fix tests for contribution form 2023-05-23 11:04:01 +02:00
Moriz Wahl
59e7f8c0d2 fix post teaser unit tests and linting 2023-05-22 17:12:32 +02:00
Moriz Wahl
4ce5bdd6fa get most components working 2023-02-15 10:23:34 +01:00
Moriz Wahl
b71b20ae81 fix more tests 2022-07-25 23:04:12 +02:00
Moriz Wahl
1c3f628fb2 count views of post teaser 2021-03-01 15:33:20 +01:00
Moriz Wahl
96066eae02 tests fixed for clickedCount 2021-02-22 22:23:56 +01:00
roschaefer
9241305d43 fix: Prever FileReader over URL.createObjectUrl
Apparently, URL.createObjectUrl is not supported in JSDom, see:
https://github.com/jsdom/jsdom/issues/1721

With FileReader we have the option to avoid it altogether.
2020-02-20 15:42:47 +01:00
roschaefer
9c98e30bb8 Fix console.errors
@mattwr18 @alina-beck there seems to be no switch or configuration to
let vue-test-utils or jest fail whenever there is a call to
`console.error`. The only way to test it for very specific tests is
this. I took it from here:

https://geedew.com/catching-prop-validation-in-vue-with-Jest/
2020-02-20 14:20:57 +01:00
Alina Beck
09dee69ee0 rename PostCard to PostTeaser 2020-02-11 10:07:16 +01:00