diff --git a/frontend/index.html b/frontend/index.html index 59c6a4a6..e6603f32 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -3,7 +3,7 @@
- + { const accountMenu = await screen.findByRole('button', { name: '打开账号菜单' }) expect(accountMenu.textContent).toContain('reader@example.com') - expect(within(accountMenu).getByTestId('default-account-avatar').getAttribute('src')).toBe( - '/windup-mark.svg', - ) + expect( + within(accountMenu).getByTestId('default-account-avatar').getAttribute('aria-hidden'), + ).toBe('true') }) it('账号菜单在点击外部或按 Escape 时关闭', async () => { diff --git a/frontend/src/app/layout/app-header.tsx b/frontend/src/app/layout/app-header.tsx index dfe556d2..e6e9a93e 100644 --- a/frontend/src/app/layout/app-header.tsx +++ b/frontend/src/app/layout/app-header.tsx @@ -1,3 +1,4 @@ +import { WindupMark } from '@/shared/ui/windup-mark' import { useEffect, useRef, useState } from 'react' import { Link, useLocation, useNavigate } from 'react-router' @@ -227,7 +228,7 @@ export function AppHeader({
diff --git a/frontend/src/pages/quick-start/index.test.tsx b/frontend/src/pages/quick-start/index.test.tsx
index 6e1b605c..cbc675a5 100644
--- a/frontend/src/pages/quick-start/index.test.tsx
+++ b/frontend/src/pages/quick-start/index.test.tsx
@@ -1468,8 +1468,7 @@ describe('QuickStartPage', () => {
it('生成结束后等待用户选择时仍保留返回入口', async () => {
renderStateFixture('template-selecting')
- await screen.findByTestId('quick-start-transcript')
- expect(readActiveRun('7')).toBe('run-1')
+ await waitFor(() => expect(readActiveRun('7')).toBe('run-1'))
})
it('renders Agent replies with the animated bot and Markdown structure', async () => {
diff --git a/frontend/src/shared/ui/asset-preview-card.test.tsx b/frontend/src/shared/ui/asset-preview-card.test.tsx
index 6bda0c94..08dfe7c8 100644
--- a/frontend/src/shared/ui/asset-preview-card.test.tsx
+++ b/frontend/src/shared/ui/asset-preview-card.test.tsx
@@ -3,7 +3,7 @@ import { cleanup, fireEvent, render, screen } from '@testing-library/react'
import { afterEach, describe, expect, it, vi } from 'vitest'
import { MemoryRouter } from 'react-router'
-import { AssetPreviewCard, AssetThumbnailImage } from './asset-preview-card'
+import { AssetPreviewCard, AssetPreviewSurface, AssetThumbnailImage } from './asset-preview-card'
afterEach(cleanup)
@@ -203,3 +203,40 @@ describe('AssetThumbnailImage', () => {
)
})
})
+
+describe('unavailable preview images', () => {
+ it('replaces a failed source with a status and retries a different URL', () => {
+ const { rerender } = render(
+