From b6db28b78d5386eb3d7b019fd0995a2494a131a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B0=E6=9C=94?= <565183519@qq.com> Date: Wed, 22 Jul 2026 17:44:38 +0800 Subject: [PATCH] test: align assertions with HoloLake branding --- src/components/SettingsPanel.test.tsx | 2 +- src/components/UpdateBanner.test.tsx | 8 ++++---- src/hooks/useGettingStartedClone.test.ts | 2 +- src/hooks/useMcpStatus.test.ts | 10 +++++----- src/hooks/useOnboarding.test.ts | 2 +- src/lib/feedbackDiagnostics.test.ts | 2 +- src/utils/openAiWorkspaceWindow.test.ts | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/components/SettingsPanel.test.tsx b/src/components/SettingsPanel.test.tsx index 717fde8..38f5988 100644 --- a/src/components/SettingsPanel.test.tsx +++ b/src/components/SettingsPanel.test.tsx @@ -329,7 +329,7 @@ describe('SettingsPanel', () => { const confirmation = within(teamRow).getByTestId('settings-workspace-remove-confirm-team') expect(screen.queryByTestId('confirm-delete-dialog')).not.toBeInTheDocument() expect(confirmation).toHaveTextContent('Remove vault?') - expect(confirmation).toHaveTextContent("This removes Team Vault from Tolaria's vault list. Files on disk are not deleted.") + expect(confirmation).toHaveTextContent("This removes Team Vault from HoloLake Era's vault list. Files on disk are not deleted.") fireEvent.click(within(confirmation).getByRole('button', { name: 'Cancel' })) expect(onRemoveVault).not.toHaveBeenCalled() diff --git a/src/components/UpdateBanner.test.tsx b/src/components/UpdateBanner.test.tsx index 55d5923..4ec5343 100644 --- a/src/components/UpdateBanner.test.tsx +++ b/src/components/UpdateBanner.test.tsx @@ -82,7 +82,7 @@ describe('UpdateBanner', () => { })) expect(screen.getByTestId('update-banner')).toBeTruthy() - expect(screen.getByText(/Tolaria Alpha 2026\.4\.16\.3/)).toBeTruthy() + expect(screen.getByText(/HoloLake Era Alpha 2026\.4\.16\.3/)).toBeTruthy() expect(screen.getByText(/is available/)).toBeTruthy() expect(screen.getByTestId('update-now-btn')).toBeTruthy() expect(screen.getByTestId('update-release-notes')).toBeTruthy() @@ -95,7 +95,7 @@ describe('UpdateBanner', () => { displayVersion: 'Alpha 2026.4.16.3', }), makeActions(), 'zh-CN') - expect(screen.getByText(/Tolaria Alpha 2026\.4\.16\.3/)).toBeTruthy() + expect(screen.getByText(/HoloLake Era Alpha 2026\.4\.16\.3/)).toBeTruthy() expect(screen.getByText(/可用/)).toBeTruthy() expect(screen.getByTestId('update-release-notes')).toHaveTextContent('发行说明') expect(screen.getByTestId('update-now-btn')).toHaveTextContent('立即更新') @@ -126,7 +126,7 @@ describe('UpdateBanner', () => { it('shows progress bar during download', () => { renderBanner(makeDownloadingStatus()) - expect(screen.getByText(/Downloading Tolaria Alpha 2026\.4\.16\.3/)).toBeTruthy() + expect(screen.getByText(/Downloading HoloLake Era Alpha 2026\.4\.16\.3/)).toBeTruthy() expect(screen.getByText('65%')).toBeTruthy() const progressBar = screen.getByTestId('update-progress') @@ -148,7 +148,7 @@ describe('UpdateBanner', () => { it('shows restart button when update is ready', () => { renderBanner(makeReadyStatus()) - expect(screen.getByText(/Tolaria 2026\.4\.16/)).toBeTruthy() + expect(screen.getByText(/HoloLake Era 2026\.4\.16/)).toBeTruthy() expect(screen.getByText(/restart to apply/)).toBeTruthy() expect(screen.getByTestId('update-restart-btn')).toBeTruthy() }) diff --git a/src/hooks/useGettingStartedClone.test.ts b/src/hooks/useGettingStartedClone.test.ts index 0626759..797debc 100644 --- a/src/hooks/useGettingStartedClone.test.ts +++ b/src/hooks/useGettingStartedClone.test.ts @@ -88,7 +88,7 @@ describe('useGettingStartedClone', () => { expect(onSuccess).not.toHaveBeenCalled() expect(onError).toHaveBeenCalledWith( - 'Tolaria needs a restart before macOS can open another folder picker. Restart to apply the downloaded update and try again.', + 'HoloLake Era needs a restart before macOS can open another folder picker. Restart to apply the downloaded update and try again.', ) }) }) diff --git a/src/hooks/useMcpStatus.test.ts b/src/hooks/useMcpStatus.test.ts index a7454f1..5227903 100644 --- a/src/hooks/useMcpStatus.test.ts +++ b/src/hooks/useMcpStatus.test.ts @@ -169,7 +169,7 @@ describe('useMcpStatus', () => { name: 'connects external AI tools for the current vault on demand', overrideKey: 'register_mcp_tools' as const, overrideValue: 'registered', - toastFragment: 'Tolaria external AI tools connected successfully', + toastFragment: 'HoloLake Era external AI tools connected successfully', }, { action: 'connect' as const, @@ -189,7 +189,7 @@ describe('useMcpStatus', () => { name: 'disconnects external AI tools explicitly', overrideKey: 'remove_mcp_tools' as const, overrideValue: 'removed', - toastFragment: 'Tolaria external AI tools disconnected successfully', + toastFragment: 'HoloLake Era external AI tools disconnected successfully', }, { action: 'disconnect' as const, @@ -243,14 +243,14 @@ describe('useMcpStatus', () => { const { expectedSnippet, onToast, writeText } = await copySnippetInBrowser('standard') expect(writeText).toHaveBeenCalledWith(expectedSnippet) - expect(onToast).toHaveBeenCalledWith('Tolaria MCP config copied to clipboard') + expect(onToast).toHaveBeenCalledWith('HoloLake Era MCP config copied to clipboard') }) it('copies the OpenCode MCP config snippet to the clipboard', async () => { const { expectedSnippet, onToast, writeText } = await copySnippetInBrowser('opencode') expect(writeText).toHaveBeenCalledWith(expectedSnippet) - expect(onToast).toHaveBeenCalledWith('Tolaria MCP config copied to clipboard') + expect(onToast).toHaveBeenCalledWith('HoloLake Era MCP config copied to clipboard') }) it('uses the native clipboard command inside the Tauri app', async () => { @@ -278,6 +278,6 @@ describe('useMcpStatus', () => { expect(invoke).toHaveBeenCalledWith('copy_text_to_clipboard', { text: snippet }) expect(writeText).not.toHaveBeenCalled() - expect(onToast).toHaveBeenCalledWith('Tolaria MCP config copied to clipboard') + expect(onToast).toHaveBeenCalledWith('HoloLake Era MCP config copied to clipboard') }) }) diff --git a/src/hooks/useOnboarding.test.ts b/src/hooks/useOnboarding.test.ts index ea10eab..c4ff286 100644 --- a/src/hooks/useOnboarding.test.ts +++ b/src/hooks/useOnboarding.test.ts @@ -371,7 +371,7 @@ describe('useOnboarding', () => { }) expect(result.current.error).toBe( - 'Tolaria needs a restart before macOS can open another folder picker. Restart to apply the downloaded update and try again.', + 'HoloLake Era needs a restart before macOS can open another folder picker. Restart to apply the downloaded update and try again.', ) expect(result.current.state.status).toBe('welcome') }) diff --git a/src/lib/feedbackDiagnostics.test.ts b/src/lib/feedbackDiagnostics.test.ts index a69994f..7763caf 100644 --- a/src/lib/feedbackDiagnostics.test.ts +++ b/src/lib/feedbackDiagnostics.test.ts @@ -24,7 +24,7 @@ describe('feedbackDiagnostics', () => { releaseChannel: 'alpha', }) - expect(bundle).toContain('Tolaria sanitized diagnostics') + expect(bundle).toContain('HoloLake Era sanitized diagnostics') expect(bundle).toContain('Build: b281') expect(bundle).toContain('Release channel: alpha') expect(bundle).toContain('[error] Load failed for [redacted-path] with token [redacted-token]') diff --git a/src/utils/openAiWorkspaceWindow.test.ts b/src/utils/openAiWorkspaceWindow.test.ts index 20d4651..e8a73ff 100644 --- a/src/utils/openAiWorkspaceWindow.test.ts +++ b/src/utils/openAiWorkspaceWindow.test.ts @@ -129,7 +129,7 @@ describe('openAiWorkspaceWindow', () => { AI_WORKSPACE_WINDOW_LABEL, expect.objectContaining({ url: expect.stringContaining('vault=%2Ftmp%2Fvault'), - title: 'Tolaria AI', + title: 'HoloLake AI · 光湖人格体工作区', width: 560, height: 680, minWidth: 420,