Skip to content

Commit 6caf4ec

Browse files
authored
Merge pull request #18894 from mozilla/fix-signin-heading-sync-no-password
fix(settings): Show correct heading for sync signin with no password set
2 parents 49986cf + 0b973c2 commit 6caf4ec

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
@@ -763,6 +763,19 @@ describe('Signin component', () => {
763763
screen.queryByRole('button', { name: 'Sign in' })
764764
).not.toBeInTheDocument();
765765
});
766+
767+
it('renders third party auth options for sync with linked account', () => {
768+
const integration = createMockSigninOAuthNativeSyncIntegration();
769+
render({ integration, hasPassword: false, hasLinkedAccount: true });
770+
771+
signInHeaderRendered();
772+
expect(
773+
screen.queryByRole('button', { name: /Continue with Google/ })
774+
).toBeInTheDocument();
775+
expect(
776+
screen.queryByRole('button', { name: /Continue with Apple/ })
777+
).toBeInTheDocument();
778+
});
766779
});
767780
});
768781

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ const Signin = ({
339339
}}
340340
/>
341341
)}
342-
{isPasswordNeededRef.current ? (
342+
{isPasswordNeededRef.current && hasPassword ? (
343343
<CardHeader
344344
headingText="Enter your password"
345345
headingAndSubheadingFtlId="signin-password-needed-header-2"

0 commit comments

Comments
 (0)