0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-20 21:32:31 -05:00

fix(experience): use absolute path for password sign-in form nav (#4973)

should use absolute path for the password sign-in form navigation
This commit is contained in:
simeng-li 2023-11-28 11:20:33 +08:00 committed by GitHub
parent 030877b656
commit 66d6491d2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View file

@ -127,7 +127,7 @@ describe('IdentifierSignInForm', () => {
await waitFor(() => {
expect(sendVerificationCodeApi).not.toBeCalled();
expect(mockedNavigate).toBeCalledWith(
{ pathname: 'password' },
{ pathname: '/sign-in/password' },
{ state: { identifier: SignInIdentifier.Username, value } }
);
});
@ -145,7 +145,7 @@ describe('IdentifierSignInForm', () => {
await waitFor(() => {
expect(sendVerificationCodeApi).not.toBeCalled();
expect(mockedNavigate).toBeCalledWith(
{ pathname: 'password' },
{ pathname: '/sign-in/password' },
{
state: {
identifier,
@ -199,7 +199,7 @@ describe('IdentifierSignInForm', () => {
await waitFor(() => {
expect(getSingleSignOnConnectorsMock).not.toBeCalled();
expect(mockedNavigate).toBeCalledWith(
{ pathname: 'password' },
{ pathname: '/sign-in/password' },
{ state: { identifier: SignInIdentifier.Username, value: username } }
);
});
@ -224,7 +224,7 @@ describe('IdentifierSignInForm', () => {
await waitFor(() => {
expect(getSingleSignOnConnectorsMock).not.toBeCalled();
expect(mockedNavigate).toBeCalledWith(
{ pathname: 'password' },
{ pathname: '/sign-in/password' },
{ state: { identifier: SignInIdentifier.Email, value: email } }
);
});
@ -254,7 +254,7 @@ describe('IdentifierSignInForm', () => {
await waitFor(() => {
expect(getSingleSignOnConnectorsMock).toBeCalled();
expect(mockedNavigate).toBeCalledWith(
{ pathname: 'password' },
{ pathname: '/sign-in/password' },
{ state: { identifier: SignInIdentifier.Email, value: email } }
);
});

View file

@ -17,7 +17,7 @@ const useOnSubmit = (signInMethods: SignIn['methods']) => {
(identifier: SignInIdentifier, value: string) => {
navigate(
{
pathname: 'password',
pathname: `/${UserFlow.SignIn}/password`,
},
{ state: { identifier, value } }
);