Closed
Description
- unit test the functions (one needs to be extracted) that put the redirect link in the URL and get it out
- preserve query params in the above
- look into whether nesting of routes in auth wrappers can routes can be dried up
Dropped:
- integration test (mocked API) App - I think this is the best way to test the redirect on login flow, because the mocks will supply a project making it possible to access pages besides
/projects
. So the test would say, given I have a project and I am logged out (re-mock/users/me
to error), when I navigate to/project/{mockProjectId}
, then I get redirected to/login
. When I log in (submit login form andresetHandlers
), then I get redirected to/project/{mockProjectId}
.
I tried to get this to work but ran into issues and it was taking too long to debug. Revisit it after SWR is removed and Formik is better understood (after separating App into Providers and Routes and testing Routes with the test-helper render
, I was getting an error from within Formik's submitForm
. The mocks were in effect.)