* added error snackbar for api fails * improved error page to be shown only for userdata errors and to allow retrying * fixed test breaking only in local because of timezone and reduced warnings for easier reading of tests results * added error management for failure inside calendars imports * added error snackbar for api fails * improved error page to be shown only for userdata errors and to allow retrying * added error management for failure inside calendars imports Co-authored-by: Camille Moussu <cmoussu@linagora.com>
This commit is contained in:
@@ -73,9 +73,9 @@ describe("HandleLogin", () => {
|
||||
|
||||
expect(screen.getByAltText("loading")).toBeInTheDocument();
|
||||
});
|
||||
test("goes to error page when userData doesnt exists after loading and calendars pending is false", () => {
|
||||
test("goes to error page when there is error in user data", () => {
|
||||
const dispatch = appHooks.useAppDispatch();
|
||||
renderWithProviders(<HandleLogin />, { user: { loading: false } });
|
||||
renderWithProviders(<HandleLogin />, { user: { error: true } });
|
||||
expect(dispatch).toHaveBeenCalledWith(push("/error"));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user