Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changeset/mosaic-user-profile-split-account-section.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@ async function renderSection(accounts = [google], overrides: FakeFapiSeed = {})
const titleRef = createRef<HTMLDivElement>();
const view = await renderWithClerk(
<UserProfileProfilePanelView
name='Jane Doe'
username=''
emails={[]}
phones={[]}
titleRef={titleRef}
connectedAccountsSlot={<UserProfileConnectedAccountsSection fallbackFocus={() => titleRef.current} />}
/>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { describe, expect, it, vi } from 'vitest';

import { UserProfileContactListRowView } from '../user-profile-account-section/user-profile-contact-list-row.view';
import { UserProfileContactListRowView } from '../user-profile-contact-list-row.view';

describe('UserProfileContactListRowView', () => {
it.each(['email', 'phone'] as const)('hides the menu when no %s action applies', kind => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { useState } from 'react';
import { describe, expect, it } from 'vitest';

import { MosaicProvider } from '../../../mosaic-provider';
import { UserProfileEmailRowView } from '../user-profile-account-section/user-profile-email-row.view';
import { UserProfilePhoneRowView } from '../user-profile-account-section/user-profile-phone-row.view';
import { UserProfileEmailSectionView } from '../user-profile-email-section/user-profile-email-section.view';
import { UserProfilePhoneSectionView } from '../user-profile-phone-section/user-profile-phone-section.view';

describe('contact removal focus', () => {
it.each(['email', 'phone'] as const)('focuses the remaining %s menu and the empty group without Add', async kind => {
Expand All @@ -21,14 +21,12 @@ describe('contact removal focus', () => {
return (
<MosaicProvider>
{kind === 'email' ? (
<UserProfileEmailRowView
allowMultipleAccounts
<UserProfileEmailSectionView
emails={items}
onRemoveEmail={remove}
/>
) : (
<UserProfilePhoneRowView
allowMultipleAccounts
<UserProfilePhoneSectionView
phones={items}
onRemovePhone={remove}
/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, expect, it } from 'vitest';

import { toContacts } from '../user-profile-account-section/user-profile-account-section.utils';
import { toContacts } from '../user-profile-contact.utils';

type Contact = { id: string; verification: { status: 'verified' | 'unverified' | null; expireAt: Date | null } };

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ it('places the connected enterprise section before Web3 wallets in the profile h
serveFapi(enterpriseAccountSeed());
await renderWithClerk(
<UserProfileProfilePanelView
name='Jane Doe'
username=''
emails={[]}
phones={[]}
enterpriseAccountsSlot={<UserProfileEnterpriseAccountsSection />}
web3WalletsSlot={
<UserProfileWeb3WalletsSectionView
Expand Down

Large diffs are not rendered by default.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type { UserProfileViewProps } from '../user-profile.view';
import { UserProfileView } from '../user-profile.view';

const pages: UserProfileViewProps['pages'] = {
account: { name: 'Preston Booth', username: 'prestonxyz' },
account: {},
security: {},
billing: {
subscription: {
Expand Down
Loading
Loading