Skip to content

Commit

Permalink
fix(rna): add missing skipVerification value to VerifyUser props
Browse files Browse the repository at this point in the history
  • Loading branch information
calebpollman committed Nov 15, 2022
1 parent 7e9d690 commit 598ae39
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ Object {
"handleChange": [MockFunction],
"handleSubmit": [MockFunction],
"isPending": false,
"skipVerification": [MockFunction],
},
}
`;
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ describe('getRouteMachineSelector', () => {
],
['signUp', [...commonSelectorProps, toSignIn, validationErrors]],
['setupTOTP', [...commonSelectorProps, toSignIn, user]],
['verifyUser', commonSelectorProps],
['verifyUser', [...commonSelectorProps, skipVerification]],
])('returns the expected route selector for %s', (route, expected) => {
const selector = getRouteMachineSelector(route as AuthenticatorRoute);
const output = selector(machineContext);
Expand Down Expand Up @@ -154,7 +154,11 @@ describe('props resolver functions', () => {
resolveSignUpRoute,
{ error, isPending, toSignIn, validationErrors },
],
['VerifyUser', resolveVerifyUserRoute, { error, isPending }],
[
'VerifyUser',
resolveVerifyUserRoute,
{ error, isPending, skipVerification },
],
])(
'resolve%s returns the expected values',
(key, resolver, routeSpecificProps) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@ const SETUP_TOTP_MACHINE_KEYS: SetupTOTPMachineKey[] = [
'toSignIn',
'user',
];
const VERIFY_USER_MACHINE_KEYS: VerifyUserMachineKey[] =
COMMON_ROUTE_MACHINE_KEYS;
const VERIFY_USER_MACHINE_KEYS: VerifyUserMachineKey[] = [
...COMMON_ROUTE_MACHINE_KEYS,
'skipVerification',
];

export const MACHINE_PROP_KEYS: Record<
AuthenticatorRouteComponentKey,
Expand Down

0 comments on commit 598ae39

Please sign in to comment.