huridocs / uwazi

Uwazi is a web-based, open-source solution for building and sharing document collections
http://www.uwazi.io
MIT License
242 stars 80 forks source link

v2 NeedAuthorization #7451

Open Zasa-san opened 3 days ago

Zasa-san commented 3 days ago

fixes issue when trying to migrate and test v2 translation component on the client, since it uses NeedAuthorization which is connected to the store. This new component uses atoms.

Also, included in this PR, there is a new testing strategy for unit testing components with atoms.

v1 NeedAuthorization is left unchanged to avoid messy breaking changes.

PR checklist:

QA checklist:

Zasa-san commented 14 hours ago

LGTM! Good catch 👏

Just a minor comment regarding the location of app/react/V2/atoms/TestAtomStoreProvider.tsx that I'm leaving to your criteria; I think it could be better to have this file as part of a test folder and not between the production code.

Good idea! I have moved all v2 testing utils into a folder, and updated some older testing methods we used with atoms