From 700ca27266d56e74c936982bbcce77599993a2a4 Mon Sep 17 00:00:00 2001 From: simeng-li Date: Wed, 15 Feb 2023 18:54:55 +0800 Subject: [PATCH] fix(ui): fix ut fix ut --- .../pages/ForgotPassword/ForgotPasswordForm/index.test.tsx | 4 ++-- .../ui/src/pages/SignInPassword/PasswordForm/index.test.tsx | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/ui/src/pages/ForgotPassword/ForgotPasswordForm/index.test.tsx b/packages/ui/src/pages/ForgotPassword/ForgotPasswordForm/index.test.tsx index ae9f2d177..9801aa787 100644 --- a/packages/ui/src/pages/ForgotPassword/ForgotPasswordForm/index.test.tsx +++ b/packages/ui/src/pages/ForgotPassword/ForgotPasswordForm/index.test.tsx @@ -5,7 +5,7 @@ import { MemoryRouter } from 'react-router-dom'; import renderWithPageContext from '@/__mocks__/RenderWithPageContext'; import { putInteraction, sendVerificationCode } from '@/apis/interaction'; -import { VerificationCodeIdentifier } from '@/types'; +import { UserFlow, VerificationCodeIdentifier } from '@/types'; import ForgotPasswordForm from '.'; @@ -81,7 +81,7 @@ describe('ForgotPasswordForm', () => { expect(sendVerificationCode).toBeCalledWith({ email }); expect(mockedNavigate).toBeCalledWith( { - pathname: 'verification-code', + pathname: `/${UserFlow.forgotPassword}/verification-code`, search: '', }, { state: { identifier, value }, replace: undefined } diff --git a/packages/ui/src/pages/SignInPassword/PasswordForm/index.test.tsx b/packages/ui/src/pages/SignInPassword/PasswordForm/index.test.tsx index 9e7669ad5..8e745e552 100644 --- a/packages/ui/src/pages/SignInPassword/PasswordForm/index.test.tsx +++ b/packages/ui/src/pages/SignInPassword/PasswordForm/index.test.tsx @@ -7,6 +7,7 @@ import { putInteraction, sendVerificationCode, } from '@/apis/interaction'; +import { UserFlow } from '@/types'; import PasswordForm from '.'; @@ -89,7 +90,7 @@ describe('PasswordSignInForm', () => { expect(mockedNavigate).toBeCalledWith( { - pathname: 'verification-code', + pathname: `/${UserFlow.signIn}/verification-code`, search: '', }, {