Skip to content

Commit

Permalink
fix authenticator snapshot to show unverified attribute correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
hbuchel committed Feb 28, 2024
1 parent 60c085d commit 83aec67
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1278,7 +1278,7 @@ exports[`authenticator renders verifyUser subcomponent 1`] = `
data-amplify-text=""
>
Email: t**************m@undefined
Email: t**[email protected]
</span>
Expand Down
6 changes: 6 additions & 0 deletions packages/vue/src/components/__tests__/authenticator.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
AuthEvent,
AuthInterpreter,
AuthMachineState,
UnverifiedUserAttributes,
} from '@aws-amplify/ui';

import { components } from '../../../global-spec';
Expand Down Expand Up @@ -59,6 +60,10 @@ const setupState = {
matches: (state: string) => state === 'setup',
} as unknown as AuthMachineState;

const unverifiedUserAttributes: UnverifiedUserAttributes = {
email: '[email protected]',
};

const mockStateRef = ref(idleState) as unknown as Ref<AuthMachineState>;

const sendSpy = jest.fn();
Expand Down Expand Up @@ -181,6 +186,7 @@ describe('authenticator', () => {
user,
totpSecretCode:
route === 'setupTotp' ? 'totp-mock-secret-code' : undefined,
unverifiedUserAttributes,
})
);

Expand Down

0 comments on commit 83aec67

Please sign in to comment.