diff --git a/packages/base/src/page/Login/index.test.tsx b/packages/base/src/page/Login/index.test.tsx index 27b0d83f4..5557e3f07 100644 --- a/packages/base/src/page/Login/index.test.tsx +++ b/packages/base/src/page/Login/index.test.tsx @@ -19,7 +19,10 @@ import { StorageKey, SystemRole } from '@actiontech/shared/lib/enum'; -import { OPEN_CLOUD_BEAVER_URL_PARAM_NAME } from '@actiontech/shared/lib/data/routePaths'; +import { + OPEN_CLOUD_BEAVER_URL_PARAM_NAME, + ROUTE_PATHS +} from '@actiontech/shared/lib/data/routePaths'; import { ignoreConsoleErrors, UtilsConsoleErrorStringsEnum @@ -211,6 +214,7 @@ describe('page/Login-ee', () => { token: `Bearer ${UserInfo.token}` } }); + expect(navigateSpy).toHaveBeenCalledWith(ROUTE_PATHS.BASE.HOME); }); describe('render login success when has location search val', () => { diff --git a/packages/base/src/page/Login/index.tsx b/packages/base/src/page/Login/index.tsx index 7de641c62..0c395c58f 100644 --- a/packages/base/src/page/Login/index.tsx +++ b/packages/base/src/page/Login/index.tsx @@ -92,6 +92,8 @@ const Login = () => { } else { navigate(path); } + } else { + navigate(ROUTE_PATHS.BASE.HOME); } } // #if [ee]