Skip to content

Commit 0b973c2

Browse files
committed
fix(settings): Show correct heading for sync signin with no password set
Because: * For sync sign in with an account that has a linked account but no password, show "Sign in" heading and not "Enter your password" This commit: * Updates the condition for the heading selection Closes #
1 parent 91c0ef3 commit 0b973c2

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

packages/fxa-settings/src/pages/Signin/index.test.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,19 @@ describe('Signin component', () => {
758758
screen.queryByRole('button', { name: 'Sign in' })
759759
).not.toBeInTheDocument();
760760
});
761+
762+
it('renders third party auth options for sync with linked account', () => {
763+
const integration = createMockSigninOAuthNativeSyncIntegration();
764+
render({ integration, hasPassword: false, hasLinkedAccount: true });
765+
766+
signInHeaderRendered();
767+
expect(
768+
screen.queryByRole('button', { name: /Continue with Google/ })
769+
).toBeInTheDocument();
770+
expect(
771+
screen.queryByRole('button', { name: /Continue with Apple/ })
772+
).toBeInTheDocument();
773+
});
761774
});
762775
});
763776

packages/fxa-settings/src/pages/Signin/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ const Signin = ({
331331
}}
332332
/>
333333
)}
334-
{isPasswordNeededRef.current ? (
334+
{isPasswordNeededRef.current && hasPassword ? (
335335
<CardHeader
336336
headingText="Enter your password"
337337
headingAndSubheadingFtlId="signin-password-needed-header-2"

0 commit comments

Comments
 (0)