diff --git a/.pa11yci.js b/.pa11yci.js index a5c7114..d4b1366 100644 --- a/.pa11yci.js +++ b/.pa11yci.js @@ -33,7 +33,7 @@ module.exports = { 'http://localhost:3000/search/', 'http://localhost:3000/admin/', 'http://localhost:3000/settings/', - 'http://localhost:3000/u/alice/', + 'http://localhost:3000/u/jay/', 'http://localhost:3000/accessibility/', ], } diff --git a/e2e/accessibility.spec.ts b/e2e/accessibility.spec.ts index fed5d53..e144784 100644 --- a/e2e/accessibility.spec.ts +++ b/e2e/accessibility.spec.ts @@ -19,7 +19,7 @@ const pages = [ { name: 'Search page', path: '/search/' }, { name: 'Admin dashboard', path: '/admin/' }, { name: 'Settings page', path: '/settings/' }, - { name: 'Profile page', path: '/u/alice/' }, + { name: 'Profile page', path: '/u/jay/' }, { name: 'Accessibility statement', path: '/accessibility/' }, ] diff --git a/src/__tests__/auth/auth-context.test.tsx b/src/__tests__/auth/auth-context.test.tsx index 77345e8..85dcb2d 100644 --- a/src/__tests__/auth/auth-context.test.tsx +++ b/src/__tests__/auth/auth-context.test.tsx @@ -64,7 +64,7 @@ describe('AuthProvider', () => { expect(screen.getByTestId('loading')).toHaveTextContent('false') }) expect(screen.getByTestId('authenticated')).toHaveTextContent('true') - expect(screen.getByTestId('handle')).toHaveTextContent('alice.bsky.social') + expect(screen.getByTestId('handle')).toHaveTextContent('jay.bsky.team') }) it('stays unauthenticated when refresh fails', async () => { diff --git a/src/__tests__/auth/client-api.test.ts b/src/__tests__/auth/client-api.test.ts index 7e69a7d..75f663e 100644 --- a/src/__tests__/auth/client-api.test.ts +++ b/src/__tests__/auth/client-api.test.ts @@ -17,12 +17,12 @@ describe('initiateLogin', () => { server.use( http.get(`${API_URL}/api/auth/login`, ({ request }) => { const url = new URL(request.url) - expect(url.searchParams.get('handle')).toBe('alice.bsky.social') + expect(url.searchParams.get('handle')).toBe('jay.bsky.team') return HttpResponse.json({ url: expectedUrl }) }) ) - const result = await initiateLogin('alice.bsky.social') + const result = await initiateLogin('jay.bsky.team') expect(result).toEqual({ url: expectedUrl }) expect(result.url).toBe(expectedUrl) }) diff --git a/src/__tests__/auth/login-page.test.tsx b/src/__tests__/auth/login-page.test.tsx index 648820b..09c569e 100644 --- a/src/__tests__/auth/login-page.test.tsx +++ b/src/__tests__/auth/login-page.test.tsx @@ -55,7 +55,7 @@ describe('LoginPage', () => { render() const input = screen.getByLabelText(/handle/i) expect(input).toBeInTheDocument() - expect(input).toHaveAttribute('placeholder', 'alice.bsky.social') + expect(input).toHaveAttribute('placeholder', 'jay.bsky.team') }) it('renders continue button', () => { @@ -107,10 +107,10 @@ describe('LoginPage', () => { const user = userEvent.setup() render() - await user.type(screen.getByLabelText(/handle/i), 'Alice.Bsky.Social') + await user.type(screen.getByLabelText(/handle/i), 'Jay.Bsky.Team') await user.click(screen.getByRole('button', { name: /continue/i })) - expect(mockLogin).toHaveBeenCalledWith('alice.bsky.social') + expect(mockLogin).toHaveBeenCalledWith('jay.bsky.team') }) it('strips trailing dot from handle', async () => { diff --git a/src/__tests__/auth/user-menu.test.tsx b/src/__tests__/auth/user-menu.test.tsx index 050587f..2b76f6f 100644 --- a/src/__tests__/auth/user-menu.test.tsx +++ b/src/__tests__/auth/user-menu.test.tsx @@ -75,8 +75,8 @@ describe('UserMenu', () => { await user.click(screen.getByRole('button', { name: /user menu/i })) await waitFor(() => { - expect(screen.getByText('Alice')).toBeInTheDocument() - expect(screen.getByText('@alice.bsky.social')).toBeInTheDocument() + expect(screen.getByText('Jay')).toBeInTheDocument() + expect(screen.getByText('@jay.bsky.team')).toBeInTheDocument() }) }) diff --git a/src/app/admin/categories/page.test.tsx b/src/app/admin/categories/page.test.tsx index cfa59a3..26a4909 100644 --- a/src/app/admin/categories/page.test.tsx +++ b/src/app/admin/categories/page.test.tsx @@ -35,9 +35,9 @@ vi.mock('next/image', () => ({ vi.mock('@/hooks/use-auth', () => { const mockAuth = { user: { - did: 'did:plc:user-alice-001', - handle: 'alice.bsky.social', - displayName: 'Alice', + did: 'did:plc:user-jay-001', + handle: 'jay.bsky.team', + displayName: 'Jay', avatarUrl: null, }, isAuthenticated: true, diff --git a/src/app/admin/moderation/page.test.tsx b/src/app/admin/moderation/page.test.tsx index 1b1dfd9..3e9bb80 100644 --- a/src/app/admin/moderation/page.test.tsx +++ b/src/app/admin/moderation/page.test.tsx @@ -35,9 +35,9 @@ vi.mock('next/image', () => ({ vi.mock('@/hooks/use-auth', () => { const mockAuth = { user: { - did: 'did:plc:user-alice-001', - handle: 'alice.bsky.social', - displayName: 'Alice', + did: 'did:plc:user-jay-001', + handle: 'jay.bsky.team', + displayName: 'Jay', avatarUrl: null, }, isAuthenticated: true, @@ -130,7 +130,7 @@ describe('AdminModerationPage', () => { render() await user.click(screen.getByRole('tab', { name: /reported users/i })) await waitFor(() => { - expect(screen.getByText(/dave\.bsky\.social/i)).toBeInTheDocument() + expect(screen.getByText(/robin\.bsky\.team/i)).toBeInTheDocument() }) }) diff --git a/src/app/admin/onboarding/page.test.tsx b/src/app/admin/onboarding/page.test.tsx index 200e1b6..ca1b6c8 100644 --- a/src/app/admin/onboarding/page.test.tsx +++ b/src/app/admin/onboarding/page.test.tsx @@ -35,9 +35,9 @@ vi.mock('next/image', () => ({ vi.mock('@/hooks/use-auth', () => { const mockAuth = { user: { - did: 'did:plc:user-alice-001', - handle: 'alice.bsky.social', - displayName: 'Alice', + did: 'did:plc:user-jay-001', + handle: 'jay.bsky.team', + displayName: 'Jay', avatarUrl: null, }, isAuthenticated: true, diff --git a/src/app/admin/page.test.tsx b/src/app/admin/page.test.tsx index 3b88ca8..8414198 100644 --- a/src/app/admin/page.test.tsx +++ b/src/app/admin/page.test.tsx @@ -34,9 +34,9 @@ vi.mock('next/image', () => ({ vi.mock('@/hooks/use-auth', () => { const mockAuth = { user: { - did: 'did:plc:user-alice-001', - handle: 'alice.bsky.social', - displayName: 'Alice', + did: 'did:plc:user-jay-001', + handle: 'jay.bsky.team', + displayName: 'Jay', avatarUrl: null, }, isAuthenticated: true, diff --git a/src/app/admin/plugins/page.test.tsx b/src/app/admin/plugins/page.test.tsx index 7dd33b7..fdcdf11 100644 --- a/src/app/admin/plugins/page.test.tsx +++ b/src/app/admin/plugins/page.test.tsx @@ -17,9 +17,9 @@ vi.mock('next/navigation', () => ({ vi.mock('@/hooks/use-auth', () => { const mockAuth = { user: { - did: 'did:plc:user-alice-001', - handle: 'alice.bsky.social', - displayName: 'Alice', + did: 'did:plc:user-jay-001', + handle: 'jay.bsky.team', + displayName: 'Jay', avatarUrl: null, }, isAuthenticated: true, diff --git a/src/app/admin/settings/page.test.tsx b/src/app/admin/settings/page.test.tsx index fa6b8e8..8326d36 100644 --- a/src/app/admin/settings/page.test.tsx +++ b/src/app/admin/settings/page.test.tsx @@ -35,9 +35,9 @@ vi.mock('next/image', () => ({ vi.mock('@/hooks/use-auth', () => { const mockAuth = { user: { - did: 'did:plc:user-alice-001', - handle: 'alice.bsky.social', - displayName: 'Alice', + did: 'did:plc:user-jay-001', + handle: 'jay.bsky.team', + displayName: 'Jay', avatarUrl: null, }, isAuthenticated: true, diff --git a/src/app/admin/sybil-detection/page.test.tsx b/src/app/admin/sybil-detection/page.test.tsx index 4cc69bf..2605eaa 100644 --- a/src/app/admin/sybil-detection/page.test.tsx +++ b/src/app/admin/sybil-detection/page.test.tsx @@ -36,9 +36,9 @@ vi.mock('next/image', () => ({ vi.mock('@/hooks/use-auth', () => { const mockAuth = { user: { - did: 'did:plc:user-alice-001', - handle: 'alice.bsky.social', - displayName: 'Alice', + did: 'did:plc:user-jay-001', + handle: 'jay.bsky.team', + displayName: 'Jay', avatarUrl: null, }, isAuthenticated: true, diff --git a/src/app/admin/trust-seeds/page.test.tsx b/src/app/admin/trust-seeds/page.test.tsx index 8ddcc40..61f2834 100644 --- a/src/app/admin/trust-seeds/page.test.tsx +++ b/src/app/admin/trust-seeds/page.test.tsx @@ -36,9 +36,9 @@ vi.mock('next/image', () => ({ vi.mock('@/hooks/use-auth', () => { const mockAuth = { user: { - did: 'did:plc:user-alice-001', - handle: 'alice.bsky.social', - displayName: 'Alice', + did: 'did:plc:user-jay-001', + handle: 'jay.bsky.team', + displayName: 'Jay', avatarUrl: null, }, isAuthenticated: true, @@ -66,7 +66,7 @@ describe('AdminTrustSeedsPage', () => { await waitFor(() => { expect(screen.getByText(/trusted-mod\.bsky\.social/i)).toBeInTheDocument() expect(screen.getByText(/verified-expert\.bsky\.social/i)).toBeInTheDocument() - expect(screen.getByText(/alice\.bsky\.social/i)).toBeInTheDocument() + expect(screen.getByText(/jay\.bsky\.team/i)).toBeInTheDocument() }) // Check type badges - use exact text to avoid partial matches const manualBadges = screen.getAllByText('Manual') @@ -123,7 +123,7 @@ describe('AdminTrustSeedsPage', () => { it('implicit seeds cannot be removed', async () => { render() await waitFor(() => { - expect(screen.getByText(/alice\.bsky\.social/i)).toBeInTheDocument() + expect(screen.getByText(/jay\.bsky\.team/i)).toBeInTheDocument() }) // Automatic seeds should not have remove buttons // There are 2 manual seeds, so 2 remove buttons diff --git a/src/app/admin/users/page.test.tsx b/src/app/admin/users/page.test.tsx index 516ace0..0514ea4 100644 --- a/src/app/admin/users/page.test.tsx +++ b/src/app/admin/users/page.test.tsx @@ -34,9 +34,9 @@ vi.mock('next/image', () => ({ vi.mock('@/hooks/use-auth', () => { const mockAuth = { user: { - did: 'did:plc:user-alice-001', - handle: 'alice.bsky.social', - displayName: 'Alice', + did: 'did:plc:user-jay-001', + handle: 'jay.bsky.team', + displayName: 'Jay', avatarUrl: null, }, isAuthenticated: true, @@ -59,10 +59,10 @@ describe('AdminUsersPage', () => { it('renders user list from API', async () => { render() await waitFor(() => { - expect(screen.getByText('Alice Admin')).toBeInTheDocument() + expect(screen.getByText('Jay Admin')).toBeInTheDocument() }) - expect(screen.getByText('Bob Moderator')).toBeInTheDocument() - expect(screen.getByText('Carol Member')).toBeInTheDocument() + expect(screen.getByText('Alex Moderator')).toBeInTheDocument() + expect(screen.getByText('Sam Member')).toBeInTheDocument() }) it('shows user roles', async () => { @@ -76,9 +76,9 @@ describe('AdminUsersPage', () => { it('shows banned status', async () => { render() await waitFor(() => { - expect(screen.getByText('Eve Banned')).toBeInTheDocument() + expect(screen.getByText('Morgan Banned')).toBeInTheDocument() }) - // Eve should show as banned + // Morgan should show as banned expect(screen.getByText('Banned')).toBeInTheDocument() }) @@ -99,7 +99,7 @@ describe('AdminUsersPage', () => { it('passes axe accessibility check', async () => { const { container } = render() await waitFor(() => { - expect(screen.getByText('Alice Admin')).toBeInTheDocument() + expect(screen.getByText('Jay Admin')).toBeInTheDocument() }) const results = await axe(container) expect(results).toHaveNoViolations() diff --git a/src/app/login/page.tsx b/src/app/login/page.tsx index d513522..7a89774 100644 --- a/src/app/login/page.tsx +++ b/src/app/login/page.tsx @@ -118,7 +118,7 @@ function LoginContent() { type="text" value={handle} onChange={(e) => setHandle(e.target.value)} - placeholder="alice.bsky.social" + placeholder="jay.bsky.team" autoComplete="username" disabled={submitting} className={cn( @@ -128,7 +128,7 @@ function LoginContent() { )} />

- Your Bluesky or AT Protocol handle (e.g. alice.bsky.social) + Your Bluesky or AT Protocol handle (e.g. jay.bsky.team)

diff --git a/src/app/new/page.test.tsx b/src/app/new/page.test.tsx index e55b04f..ee89b60 100644 --- a/src/app/new/page.test.tsx +++ b/src/app/new/page.test.tsx @@ -47,9 +47,9 @@ vi.mock('next/navigation', () => ({ vi.mock('@/hooks/use-auth', () => ({ useAuth: () => ({ user: { - did: 'did:plc:user-alice-001', - handle: 'alice.bsky.social', - displayName: 'Alice', + did: 'did:plc:user-jay-001', + handle: 'jay.bsky.team', + displayName: 'Jay', avatarUrl: null, }, isAuthenticated: true, diff --git a/src/app/notifications/page.test.tsx b/src/app/notifications/page.test.tsx index 873df34..fe7761e 100644 --- a/src/app/notifications/page.test.tsx +++ b/src/app/notifications/page.test.tsx @@ -56,9 +56,9 @@ vi.mock('@/lib/api/client', () => ({ vi.mock('@/hooks/use-auth', () => { const mockAuth = { user: { - did: 'did:plc:user-alice-001', - handle: 'alice.bsky.social', - displayName: 'Alice', + did: 'did:plc:user-jay-001', + handle: 'jay.bsky.team', + displayName: 'Jay', avatarUrl: null, }, isAuthenticated: true, @@ -82,11 +82,11 @@ const mockNotifications = [ id: 'notif-1', type: 'reply' as const, userDid: 'did:plc:user', - actorDid: 'did:plc:bob', - actorHandle: 'bob.bsky.social', + actorDid: 'did:plc:alex', + actorHandle: 'alex.bsky.team', subjectUri: 'at://did:plc:user/forum.barazo.topic.post/abc', subjectTitle: 'My Topic', - message: 'bob.bsky.social replied to your topic', + message: 'alex.bsky.team replied to your topic', read: false, createdAt: '2026-02-14T12:00:00Z', }, @@ -94,11 +94,11 @@ const mockNotifications = [ id: 'notif-2', type: 'reaction' as const, userDid: 'did:plc:user', - actorDid: 'did:plc:carol', - actorHandle: 'carol.example.com', + actorDid: 'did:plc:sam', + actorHandle: 'sam.example.com', subjectUri: 'at://did:plc:user/forum.barazo.topic.post/abc', subjectTitle: 'My Topic', - message: 'carol.example.com reacted to your topic', + message: 'sam.example.com reacted to your topic', read: true, createdAt: '2026-02-13T12:00:00Z', }, @@ -128,8 +128,8 @@ describe('NotificationsPage', () => { await new Promise((r) => setTimeout(r, 100)) }) - expect(await screen.findByText(/bob\.bsky\.social replied/)).toBeInTheDocument() - expect(screen.getByText(/carol\.example\.com reacted/)).toBeInTheDocument() + expect(await screen.findByText(/alex\.bsky\.team replied/)).toBeInTheDocument() + expect(screen.getByText(/sam\.example\.com reacted/)).toBeInTheDocument() }) it('shows unread indicator on unread notifications', async () => { diff --git a/src/app/settings/page.test.tsx b/src/app/settings/page.test.tsx index a30224c..cc6b3aa 100644 --- a/src/app/settings/page.test.tsx +++ b/src/app/settings/page.test.tsx @@ -19,9 +19,9 @@ vi.mock('next/navigation', () => ({ vi.mock('@/hooks/use-auth', () => { const mockAuth = { user: { - did: 'did:plc:user-alice-001', - handle: 'alice.bsky.social', - displayName: 'Alice', + did: 'did:plc:user-jay-001', + handle: 'jay.bsky.team', + displayName: 'Jay', avatarUrl: null, }, isAuthenticated: true, diff --git a/src/app/settings/reports/page.test.tsx b/src/app/settings/reports/page.test.tsx index ff10423..f362d8a 100644 --- a/src/app/settings/reports/page.test.tsx +++ b/src/app/settings/reports/page.test.tsx @@ -22,9 +22,9 @@ vi.mock('next/navigation', () => ({ vi.mock('@/hooks/use-auth', () => { const mockAuth = { user: { - did: 'did:plc:user-alice-001', - handle: 'alice.bsky.social', - displayName: 'Alice', + did: 'did:plc:user-jay-001', + handle: 'jay.bsky.team', + displayName: 'Jay', avatarUrl: null, }, isAuthenticated: true, diff --git a/src/app/setup/page.test.tsx b/src/app/setup/page.test.tsx index a155cff..a134bde 100644 --- a/src/app/setup/page.test.tsx +++ b/src/app/setup/page.test.tsx @@ -46,9 +46,9 @@ vi.mock('@/hooks/use-auth', () => ({ function setAuthenticated() { mockAuthState.user = { - did: 'did:plc:user-alice-001', - handle: 'alice.bsky.social', - displayName: 'Alice', + did: 'did:plc:user-jay-001', + handle: 'jay.bsky.team', + displayName: 'Jay', avatarUrl: null, } mockAuthState.isAuthenticated = true @@ -172,7 +172,7 @@ describe('SetupPage', () => { await new Promise((resolve) => setTimeout(resolve, 100)) return HttpResponse.json({ initialized: true, - adminDid: 'did:plc:user-alice-001', + adminDid: 'did:plc:user-jay-001', communityName: 'Test', }) }) diff --git a/src/app/u/[handle]/edit/page.test.tsx b/src/app/u/[handle]/edit/page.test.tsx index 4f61b1a..e2f8e10 100644 --- a/src/app/u/[handle]/edit/page.test.tsx +++ b/src/app/u/[handle]/edit/page.test.tsx @@ -49,17 +49,17 @@ vi.mock('@/hooks/use-toast', () => ({ function createCommunityProfile(overrides?: Partial): CommunityProfile { return { - did: 'did:plc:user-alice-001', - handle: 'alice.bsky.social', - displayName: 'Alice', - avatarUrl: 'https://cdn.bsky.social/avatar/alice.jpg', + did: 'did:plc:user-jay-001', + handle: 'jay.bsky.team', + displayName: 'Jay', + avatarUrl: 'https://cdn.bsky.social/avatar/jay.jpg', bannerUrl: null, bio: 'Community admin and AT Protocol enthusiast.', communityDid: 'did:plc:test-community-123', hasOverride: false, source: { - displayName: 'Alice', - avatarUrl: 'https://cdn.bsky.social/avatar/alice.jpg', + displayName: 'Jay', + avatarUrl: 'https://cdn.bsky.social/avatar/jay.jpg', bannerUrl: null, bio: 'Community admin and AT Protocol enthusiast.', }, @@ -69,7 +69,7 @@ function createCommunityProfile(overrides?: Partial): Communit function defaultAuth(overrides?: Record) { return { - user: { did: 'did:plc:user-alice-001', handle: 'alice.bsky.social' }, + user: { did: 'did:plc:user-jay-001', handle: 'jay.bsky.team' }, isAuthenticated: true, isLoading: false, getAccessToken: () => 'mock-token', @@ -122,7 +122,7 @@ describe('EditProfilePage', () => { defaultAuth({ user: null, isAuthenticated: false, getAccessToken: () => null }) ) - render() + render() await waitFor(() => { expect(mockReplace).toHaveBeenCalledWith('/') @@ -130,41 +130,41 @@ describe('EditProfilePage', () => { }) it('does not redirect when authenticated', () => { - render() + render() expect(mockReplace).not.toHaveBeenCalled() }) }) describe('own profile check', () => { it('redirects when viewing another user profile', async () => { - render() + render() await waitFor(() => { - expect(mockReplace).toHaveBeenCalledWith('/u/bob.bsky.social') + expect(mockReplace).toHaveBeenCalledWith('/u/alex.bsky.team') }) }) }) describe('form rendering', () => { it('renders display name input', () => { - render() + render() expect(screen.getByLabelText(/display name/i)).toBeInTheDocument() }) it('renders bio textarea', () => { - render() + render() expect(screen.getByLabelText(/bio/i)).toBeInTheDocument() }) it('renders save button', () => { - render() + render() expect(screen.getByRole('button', { name: /save/i })).toBeInTheDocument() }) it('renders cancel link', () => { - render() + render() const cancel = screen.getByRole('link', { name: /cancel/i }) - expect(cancel).toHaveAttribute('href', '/u/alice.bsky.social') + expect(cancel).toHaveAttribute('href', '/u/jay.bsky.team') }) }) @@ -178,7 +178,7 @@ describe('EditProfilePage', () => { }) ) - render() + render() const indicators = screen.getAllByText(/synced from at protocol/i) expect(indicators.length).toBeGreaterThanOrEqual(1) }) @@ -187,12 +187,12 @@ describe('EditProfilePage', () => { mockUseCommunityProfile.mockReturnValue( defaultCommunityProfile({ profile: createCommunityProfile({ hasOverride: true }), - displayName: 'Custom Alice', + displayName: 'Custom Jay', bio: 'Custom bio', }) ) - render() + render() const indicators = screen.getAllByText(/custom for this community/i) expect(indicators.length).toBeGreaterThanOrEqual(1) }) @@ -204,7 +204,7 @@ describe('EditProfilePage', () => { mockUseCommunityProfile.mockReturnValue(defaultCommunityProfile({ handleSave })) const user = userEvent.setup() - render() + render() await user.click(screen.getByRole('button', { name: /save/i })) expect(handleSave).toHaveBeenCalled() @@ -213,7 +213,7 @@ describe('EditProfilePage', () => { it('disables save button while saving', () => { mockUseCommunityProfile.mockReturnValue(defaultCommunityProfile({ saving: true })) - render() + render() expect(screen.getByRole('button', { name: /saving/i })).toBeDisabled() }) }) @@ -223,12 +223,12 @@ describe('EditProfilePage', () => { mockUseCommunityProfile.mockReturnValue( defaultCommunityProfile({ profile: createCommunityProfile({ hasOverride: true }), - displayName: 'Custom Alice', + displayName: 'Custom Jay', bio: 'Custom bio', }) ) - render() + render() const resetButtons = screen.getAllByRole('button', { name: /reset to at protocol/i }) expect(resetButtons.length).toBe(2) }) @@ -238,14 +238,14 @@ describe('EditProfilePage', () => { mockUseCommunityProfile.mockReturnValue( defaultCommunityProfile({ profile: createCommunityProfile({ hasOverride: true }), - displayName: 'Custom Alice', + displayName: 'Custom Jay', bio: '', setDisplayName, }) ) const user = userEvent.setup() - render() + render() const resetButtons = screen.getAllByRole('button', { name: /reset to at protocol/i }) await user.click(resetButtons[0]!) @@ -259,7 +259,7 @@ describe('EditProfilePage', () => { defaultCommunityProfile({ loading: true, profile: null }) ) - render() + render() expect(screen.getByText(/loading/i)).toBeInTheDocument() }) }) @@ -270,7 +270,7 @@ describe('EditProfilePage', () => { defaultCommunityProfile({ error: 'Failed to load community profile.' }) ) - render() + render() expect(screen.getByText(/failed to load community profile/i)).toBeInTheDocument() }) }) diff --git a/src/app/u/[handle]/error.test.tsx b/src/app/u/[handle]/error.test.tsx index 49e3223..a528c4d 100644 --- a/src/app/u/[handle]/error.test.tsx +++ b/src/app/u/[handle]/error.test.tsx @@ -12,7 +12,7 @@ vi.mock('next/link', () => ({ })) vi.mock('next/navigation', () => ({ - usePathname: () => '/u/alice.bsky.social', + usePathname: () => '/u/jay.bsky.team', })) describe('ProfileError', () => { diff --git a/src/app/u/[handle]/page.test.tsx b/src/app/u/[handle]/page.test.tsx index 5e469d3..ef8f83d 100644 --- a/src/app/u/[handle]/page.test.tsx +++ b/src/app/u/[handle]/page.test.tsx @@ -41,14 +41,14 @@ vi.mock('next/navigation', () => ({ describe('UserProfilePage', () => { it('renders user display name in heading', async () => { - render() + render() await waitFor(() => { - expect(screen.getByRole('heading', { name: /alice/i })).toBeInTheDocument() + expect(screen.getByRole('heading', { name: /jay/i })).toBeInTheDocument() }) }) it('renders breadcrumbs', async () => { - render() + render() await waitFor(() => { expect(screen.getByText('Home')).toBeInTheDocument() }) @@ -57,22 +57,22 @@ describe('UserProfilePage', () => { }) it('renders profile sections', async () => { - render() + render() await waitFor(() => { expect(screen.getByText(/recent activity/i)).toBeInTheDocument() }) }) it('renders user bio when available', async () => { - render() + render() await waitFor(() => { expect(screen.getByText(/community admin and at protocol enthusiast/i)).toBeInTheDocument() }) }) it('renders post count from activity data', async () => { - render() - // alice has topicCount 15 + replyCount 42 = 57 posts + render() + // jay has topicCount 15 + replyCount 42 = 57 posts await waitFor(() => { expect(screen.getByText(/57 posts/i)).toBeInTheDocument() }) @@ -86,25 +86,25 @@ describe('UserProfilePage', () => { }) it('renders community-scoped profile with globalActivity', async () => { - render() - // Alice's mock data has globalActivity (communityCount: 2) + render() + // Jay's mock data has globalActivity (communityCount: 2) await waitFor(() => { expect(screen.getByText('Barazo-wide')).toBeInTheDocument() }) }) it('renders AT Protocol stats', async () => { - render() + render() await waitFor(() => { expect(screen.getByText(/150 followers/i)).toBeInTheDocument() }) }) it('renders Bluesky link', async () => { - render() + render() await waitFor(() => { - const link = screen.getByRole('link', { name: /bsky\.app\/profile\/alice\.bsky\.social/i }) - expect(link).toHaveAttribute('href', 'https://bsky.app/profile/alice.bsky.social') + const link = screen.getByRole('link', { name: /bsky\.app\/profile\/jay\.bsky\.team/i }) + expect(link).toHaveAttribute('href', 'https://bsky.app/profile/jay.bsky.team') }) }) }) diff --git a/src/components/age-gate-dialog.test.tsx b/src/components/age-gate-dialog.test.tsx index 89c4982..3c10001 100644 --- a/src/components/age-gate-dialog.test.tsx +++ b/src/components/age-gate-dialog.test.tsx @@ -12,9 +12,9 @@ const mockGetAccessToken = vi.fn<() => string | null>(() => 'mock-access-token') vi.mock('@/hooks/use-auth', () => ({ useAuth: () => ({ user: { - did: 'did:plc:user-alice-001', - handle: 'alice.bsky.social', - displayName: 'Alice', + did: 'did:plc:user-jay-001', + handle: 'jay.bsky.team', + displayName: 'Jay', avatarUrl: null, }, isAuthenticated: true, diff --git a/src/components/block-mute-button.test.tsx b/src/components/block-mute-button.test.tsx index 0744bbe..7d82101 100644 --- a/src/components/block-mute-button.test.tsx +++ b/src/components/block-mute-button.test.tsx @@ -13,9 +13,9 @@ const mockToast = vi.fn() vi.mock('@/hooks/use-auth', () => ({ useAuth: () => ({ user: { - did: 'did:plc:user-alice-001', - handle: 'alice.bsky.social', - displayName: 'Alice', + did: 'did:plc:user-jay-001', + handle: 'jay.bsky.team', + displayName: 'Jay', avatarUrl: null, }, isAuthenticated: true, diff --git a/src/components/layout/forum-layout.test.tsx b/src/components/layout/forum-layout.test.tsx index 73a830f..b4720a3 100644 --- a/src/components/layout/forum-layout.test.tsx +++ b/src/components/layout/forum-layout.test.tsx @@ -38,9 +38,9 @@ vi.mock('next/link', () => ({ vi.mock('@/hooks/use-auth', () => ({ useAuth: () => ({ user: { - did: 'did:plc:user-alice-001', - handle: 'alice.bsky.social', - displayName: 'Alice', + did: 'did:plc:user-jay-001', + handle: 'jay.bsky.team', + displayName: 'Jay', avatarUrl: null, }, isAuthenticated: true, diff --git a/src/components/user-profile-card.test.tsx b/src/components/user-profile-card.test.tsx index 9818634..2cbb36b 100644 --- a/src/components/user-profile-card.test.tsx +++ b/src/components/user-profile-card.test.tsx @@ -10,8 +10,8 @@ import { UserProfileCard } from './user-profile-card' const mockUser = { did: 'did:plc:test-user', - handle: 'alice.bsky.social', - displayName: 'Alice', + handle: 'jay.bsky.team', + displayName: 'Jay', reputation: 42, postCount: 15, joinedAt: '2025-01-01T00:00:00Z', @@ -20,20 +20,20 @@ const mockUser = { describe('UserProfileCard', () => { it('renders trigger with user handle', () => { render() - expect(screen.getByText('alice.bsky.social')).toBeInTheDocument() + expect(screen.getByText('jay.bsky.team')).toBeInTheDocument() }) it('shows card on hover', async () => { const user = userEvent.setup() render() - await user.hover(screen.getByText('alice.bsky.social')) + await user.hover(screen.getByText('jay.bsky.team')) // Wait for hover delay await act(async () => { await new Promise((r) => setTimeout(r, 250)) }) - expect(screen.getByText('Alice')).toBeInTheDocument() + expect(screen.getByText('Jay')).toBeInTheDocument() expect(screen.getByLabelText(/reputation/i)).toBeInTheDocument() }) @@ -47,26 +47,26 @@ describe('UserProfileCard', () => { await new Promise((r) => setTimeout(r, 250)) }) - expect(screen.getByText('Alice')).toBeInTheDocument() + expect(screen.getByText('Jay')).toBeInTheDocument() }) it('hides card on Escape', async () => { const user = userEvent.setup() render() - await user.hover(screen.getByText('alice.bsky.social')) + await user.hover(screen.getByText('jay.bsky.team')) await act(async () => { await new Promise((r) => setTimeout(r, 250)) }) - expect(screen.getByText('Alice')).toBeInTheDocument() + expect(screen.getByText('Jay')).toBeInTheDocument() await user.keyboard('{Escape}') - expect(screen.queryByText('Alice')).not.toBeInTheDocument() + expect(screen.queryByText('Jay')).not.toBeInTheDocument() }) it('shows post count', async () => { const user = userEvent.setup() render() - await user.hover(screen.getByText('alice.bsky.social')) + await user.hover(screen.getByText('jay.bsky.team')) await act(async () => { await new Promise((r) => setTimeout(r, 250)) }) @@ -75,8 +75,8 @@ describe('UserProfileCard', () => { it('renders as link to user profile', () => { render() - const link = screen.getByRole('link', { name: /alice\.bsky\.social/i }) - expect(link).toHaveAttribute('href', '/u/alice.bsky.social') + const link = screen.getByRole('link', { name: /jay\.bsky\.team/i }) + expect(link).toHaveAttribute('href', '/u/jay.bsky.team') }) it('passes axe accessibility check', async () => { diff --git a/src/hooks/use-onboarding.test.ts b/src/hooks/use-onboarding.test.ts index bd9a97c..d2c221c 100644 --- a/src/hooks/use-onboarding.test.ts +++ b/src/hooks/use-onboarding.test.ts @@ -13,9 +13,9 @@ const mockGetAccessToken = vi.fn<() => string | null>(() => 'mock-access-token') vi.mock('@/hooks/use-auth', () => ({ useAuth: () => ({ user: { - did: 'did:plc:user-alice-001', - handle: 'alice.bsky.social', - displayName: 'Alice', + did: 'did:plc:user-jay-001', + handle: 'jay.bsky.team', + displayName: 'Jay', avatarUrl: null, }, isAuthenticated: true, diff --git a/src/mocks/data.ts b/src/mocks/data.ts index 5b4c5ee..d00a776 100644 --- a/src/mocks/data.ts +++ b/src/mocks/data.ts @@ -45,11 +45,11 @@ const LAST_WEEK = '2026-02-07T12:00:00.000Z' // --- Users --- export const mockUsers = [ - { did: 'did:plc:user-alice-001', handle: 'alice.bsky.social' }, - { did: 'did:plc:user-bob-002', handle: 'bob.bsky.social' }, - { did: 'did:plc:user-carol-003', handle: 'carol.example.com' }, - { did: 'did:plc:user-dave-004', handle: 'dave.bsky.social' }, - { did: 'did:plc:user-eve-005', handle: 'eve.forum.example' }, + { did: 'did:plc:user-jay-001', handle: 'jay.bsky.team' }, + { did: 'did:plc:user-alex-002', handle: 'alex.bsky.team' }, + { did: 'did:plc:user-sam-003', handle: 'sam.example.com' }, + { did: 'did:plc:user-robin-004', handle: 'robin.bsky.team' }, + { did: 'did:plc:user-morgan-005', handle: 'morgan.forum.example' }, ] as const // --- Author Profiles (for enriched Topic/Reply responses) --- @@ -58,13 +58,13 @@ export const mockAuthorProfiles: AuthorProfile[] = [ { did: mockUsers[0]!.did, handle: mockUsers[0]!.handle, - displayName: 'Alice', - avatarUrl: 'https://cdn.bsky.social/avatar/alice.jpg', + displayName: 'Jay', + avatarUrl: 'https://cdn.bsky.social/avatar/jay.jpg', }, - { did: mockUsers[1]!.did, handle: mockUsers[1]!.handle, displayName: 'Bob', avatarUrl: null }, - { did: mockUsers[2]!.did, handle: mockUsers[2]!.handle, displayName: 'Carol', avatarUrl: null }, - { did: mockUsers[3]!.did, handle: mockUsers[3]!.handle, displayName: 'Dave', avatarUrl: null }, - { did: mockUsers[4]!.did, handle: mockUsers[4]!.handle, displayName: 'Eve', avatarUrl: null }, + { did: mockUsers[1]!.did, handle: mockUsers[1]!.handle, displayName: 'Alex', avatarUrl: null }, + { did: mockUsers[2]!.did, handle: mockUsers[2]!.handle, displayName: 'Sam', avatarUrl: null }, + { did: mockUsers[3]!.did, handle: mockUsers[3]!.handle, displayName: 'Robin', avatarUrl: null }, + { did: mockUsers[4]!.did, handle: mockUsers[4]!.handle, displayName: 'Morgan', avatarUrl: null }, ] // --- Auth --- @@ -72,18 +72,18 @@ export const mockAuthorProfiles: AuthorProfile[] = [ export const mockAuthSession: AuthSession = { accessToken: 'mock-access-token-xyz', expiresAt: '2026-02-15T13:00:00.000Z', - did: 'did:plc:user-alice-001', - handle: 'alice.bsky.social', - displayName: 'Alice', - avatarUrl: 'https://cdn.bsky.social/avatar/alice.jpg', + did: 'did:plc:user-jay-001', + handle: 'jay.bsky.team', + displayName: 'Jay', + avatarUrl: 'https://cdn.bsky.social/avatar/jay.jpg', role: 'user', } export const mockAuthUser: AuthUser = { - did: 'did:plc:user-alice-001', - handle: 'alice.bsky.social', - displayName: 'Alice', - avatarUrl: 'https://cdn.bsky.social/avatar/alice.jpg', + did: 'did:plc:user-jay-001', + handle: 'jay.bsky.team', + displayName: 'Jay', + avatarUrl: 'https://cdn.bsky.social/avatar/jay.jpg', role: 'user', } @@ -345,7 +345,7 @@ export const mockNotifications: Notification[] = [ actorHandle: mockUsers[1]!.handle, subjectUri: mockTopics[0]!.uri, subjectTitle: 'Welcome to Barazo Forums', - message: 'bob.bsky.social replied to your topic', + message: 'alex.bsky.team replied to your topic', read: false, createdAt: NOW, }, @@ -357,7 +357,7 @@ export const mockNotifications: Notification[] = [ actorHandle: mockUsers[2]!.handle, subjectUri: mockTopics[0]!.uri, subjectTitle: 'Welcome to Barazo Forums', - message: 'carol.example.com reacted to your topic', + message: 'sam.example.com reacted to your topic', read: false, createdAt: YESTERDAY, }, @@ -369,7 +369,7 @@ export const mockNotifications: Notification[] = [ actorHandle: mockUsers[3]!.handle, subjectUri: `at://${mockUsers[3]!.did}/forum.barazo.reply.post/3kf6ddd`, subjectTitle: null, - message: 'dave.bsky.social mentioned you in a reply', + message: 'robin.bsky.team mentioned you in a reply', read: true, createdAt: YESTERDAY, }, @@ -694,7 +694,7 @@ export const mockAdminUsers: AdminUser[] = [ { did: mockUsers[0]!.did, handle: mockUsers[0]!.handle, - displayName: 'Alice Admin', + displayName: 'Jay Admin', avatarUrl: null, role: 'admin', isBanned: false, @@ -710,7 +710,7 @@ export const mockAdminUsers: AdminUser[] = [ { did: mockUsers[1]!.did, handle: mockUsers[1]!.handle, - displayName: 'Bob Moderator', + displayName: 'Alex Moderator', avatarUrl: null, role: 'moderator', isBanned: false, @@ -726,7 +726,7 @@ export const mockAdminUsers: AdminUser[] = [ { did: mockUsers[2]!.did, handle: mockUsers[2]!.handle, - displayName: 'Carol Member', + displayName: 'Sam Member', avatarUrl: null, role: 'member', isBanned: false, @@ -742,7 +742,7 @@ export const mockAdminUsers: AdminUser[] = [ { did: mockUsers[3]!.did, handle: mockUsers[3]!.handle, - displayName: 'Dave Troublemaker', + displayName: 'Robin Troublemaker', avatarUrl: null, role: 'member', isBanned: false, @@ -758,7 +758,7 @@ export const mockAdminUsers: AdminUser[] = [ { did: mockUsers[4]!.did, handle: mockUsers[4]!.handle, - displayName: 'Eve Banned', + displayName: 'Morgan Banned', avatarUrl: null, role: 'member', isBanned: true, @@ -941,9 +941,9 @@ export const mockOnboardingFields: OnboardingField[] = [ export const mockMyReports: MyReport[] = [ { id: 1, - reporterDid: 'did:plc:user-alice-001', - targetUri: 'at://did:plc:user-bob-002/forum.barazo.topic.post/abc123', - targetDid: 'did:plc:user-bob-002', + reporterDid: 'did:plc:user-jay-001', + targetUri: 'at://did:plc:user-alex-002/forum.barazo.topic.post/abc123', + targetDid: 'did:plc:user-alex-002', reasonType: 'spam', description: 'This is spam content', status: 'pending', @@ -957,9 +957,9 @@ export const mockMyReports: MyReport[] = [ }, { id: 2, - reporterDid: 'did:plc:user-alice-001', - targetUri: 'at://did:plc:user-carol-003/forum.barazo.topic.post/def456', - targetDid: 'did:plc:user-carol-003', + reporterDid: 'did:plc:user-jay-001', + targetUri: 'at://did:plc:user-sam-003/forum.barazo.topic.post/def456', + targetDid: 'did:plc:user-sam-003', reasonType: 'harassment', description: 'Targeted harassment', status: 'resolved', @@ -973,9 +973,9 @@ export const mockMyReports: MyReport[] = [ }, { id: 3, - reporterDid: 'did:plc:user-alice-001', - targetUri: 'at://did:plc:user-dave-004/forum.barazo.topic.reply/ghi789', - targetDid: 'did:plc:user-dave-004', + reporterDid: 'did:plc:user-jay-001', + targetUri: 'at://did:plc:user-robin-004/forum.barazo.topic.reply/ghi789', + targetDid: 'did:plc:user-robin-004', reasonType: 'misleading', description: 'Misleading information', status: 'resolved', @@ -989,9 +989,9 @@ export const mockMyReports: MyReport[] = [ }, { id: 4, - reporterDid: 'did:plc:user-alice-001', - targetUri: 'at://did:plc:user-eve-005/forum.barazo.topic.post/jkl012', - targetDid: 'did:plc:user-eve-005', + reporterDid: 'did:plc:user-jay-001', + targetUri: 'at://did:plc:user-morgan-005/forum.barazo.topic.post/jkl012', + targetDid: 'did:plc:user-morgan-005', reasonType: 'violation', description: 'Rule violation', status: 'pending', @@ -1008,11 +1008,11 @@ export const mockMyReports: MyReport[] = [ // --- User Profiles (public, keyed by handle) --- export const mockUserProfiles: Record = { - 'alice.bsky.social': { - did: 'did:plc:user-alice-001', - handle: 'alice.bsky.social', - displayName: 'Alice', - avatarUrl: 'https://cdn.bsky.social/avatar/alice.jpg', + 'jay.bsky.team': { + did: 'did:plc:user-jay-001', + handle: 'jay.bsky.team', + displayName: 'Jay', + avatarUrl: 'https://cdn.bsky.social/avatar/jay.jpg', bannerUrl: null, bio: 'Community admin and AT Protocol enthusiast.', role: 'admin', @@ -1024,7 +1024,7 @@ export const mockUserProfiles: Record = { atprotoPostsCount: 230, hasBlueskyProfile: true, communityCount: 2, - labels: [{ val: 'adult-content', src: 'did:plc:user-alice-001', isSelfLabel: true }], + labels: [{ val: 'adult-content', src: 'did:plc:user-jay-001', isSelfLabel: true }], activity: { topicCount: 15, replyCount: 42, @@ -1038,10 +1038,10 @@ export const mockUserProfiles: Record = { votesReceived: 55, }, }, - 'bob.bsky.social': { - did: 'did:plc:user-bob-002', - handle: 'bob.bsky.social', - displayName: 'Bob', + 'alex.bsky.team': { + did: 'did:plc:user-alex-002', + handle: 'alex.bsky.team', + displayName: 'Alex', avatarUrl: null, bannerUrl: null, bio: null, @@ -1077,17 +1077,17 @@ export const mockPublicSettings: PublicSettings = { // --- Community Profile (own profile in a community) --- export const mockCommunityProfile: CommunityProfile = { - did: 'did:plc:user-alice-001', - handle: 'alice.bsky.social', - displayName: 'Alice', - avatarUrl: 'https://cdn.bsky.social/avatar/alice.jpg', + did: 'did:plc:user-jay-001', + handle: 'jay.bsky.team', + displayName: 'Jay', + avatarUrl: 'https://cdn.bsky.social/avatar/jay.jpg', bannerUrl: null, bio: 'Community admin and AT Protocol enthusiast.', communityDid: COMMUNITY_DID, hasOverride: false, source: { - displayName: 'Alice', - avatarUrl: 'https://cdn.bsky.social/avatar/alice.jpg', + displayName: 'Jay', + avatarUrl: 'https://cdn.bsky.social/avatar/jay.jpg', bannerUrl: null, bio: 'Community admin and AT Protocol enthusiast.', }, @@ -1119,7 +1119,7 @@ export const mockSybilClusters: SybilCluster[] = [ suspicionRatio: 0.62, status: 'monitoring', detectedAt: YESTERDAY, - reviewedBy: 'did:plc:user-alice-001', + reviewedBy: 'did:plc:user-jay-001', reviewedAt: NOW, }, { @@ -1131,7 +1131,7 @@ export const mockSybilClusters: SybilCluster[] = [ suspicionRatio: 0.33, status: 'dismissed', detectedAt: LAST_WEEK, - reviewedBy: 'did:plc:user-alice-001', + reviewedBy: 'did:plc:user-jay-001', reviewedAt: YESTERDAY, }, ] @@ -1245,9 +1245,9 @@ export const mockTrustSeeds: TrustSeed[] = [ }, { id: 3, - did: 'did:plc:user-alice-001', - handle: 'alice.bsky.social', - displayName: 'Alice', + did: 'did:plc:user-jay-001', + handle: 'jay.bsky.team', + displayName: 'Jay', communityId: null, reason: null, implicit: true, @@ -1255,9 +1255,9 @@ export const mockTrustSeeds: TrustSeed[] = [ }, { id: 4, - did: 'did:plc:user-bob-002', - handle: 'bob.bsky.social', - displayName: 'Bob', + did: 'did:plc:user-alex-002', + handle: 'alex.bsky.team', + displayName: 'Alex', communityId: null, reason: null, implicit: true, @@ -1265,9 +1265,9 @@ export const mockTrustSeeds: TrustSeed[] = [ }, { id: 5, - did: 'did:plc:user-carol-003', - handle: 'carol.example.com', - displayName: 'Carol', + did: 'did:plc:user-sam-003', + handle: 'sam.example.com', + displayName: 'Sam', communityId: COMMUNITY_DID, reason: null, implicit: true, diff --git a/src/mocks/handlers.ts b/src/mocks/handlers.ts index 8ba8b2b..a53b9c7 100644 --- a/src/mocks/handlers.ts +++ b/src/mocks/handlers.ts @@ -841,7 +841,7 @@ export const handlers = [ return HttpResponse.json({ ...cluster, ...body, - reviewedBy: 'did:plc:user-alice-001', + reviewedBy: 'did:plc:user-jay-001', reviewedAt: new Date().toISOString(), }) }), diff --git a/src/test/mock-auth.tsx b/src/test/mock-auth.tsx index 5a96526..ba3c17a 100644 --- a/src/test/mock-auth.tsx +++ b/src/test/mock-auth.tsx @@ -9,10 +9,10 @@ import type { AuthContextValue } from '@/context/auth-context' import type { AuthUser } from '@/lib/api/types' export const mockUser: AuthUser = { - did: 'did:plc:user-alice-001', - handle: 'alice.bsky.social', - displayName: 'Alice', - avatarUrl: 'https://cdn.bsky.social/avatar/alice.jpg', + did: 'did:plc:user-jay-001', + handle: 'jay.bsky.team', + displayName: 'Jay', + avatarUrl: 'https://cdn.bsky.social/avatar/jay.jpg', role: 'user', }