Files
deepseek-harness/packages/client/ui-sidebar-documentpreview/tests/loading-indicator.client.spec.tsx
T
Yif f51addaa0d fix(web-sidebar): resolve review feedback on document preview polish
- files tree records its scroll offset in a ref and commits it once on
  unmount, only while the owner's signal is live, so a scroll neither
  re-renders the tree nor writes to a forgotten bucket
- LoadingIndicator drops iconOnly and always renders icon-only
- registry and the unviewable list share one suffix-matching module, and
  register() rejects binaryExtensions entries outside extensions
- drop the ambiguous key suffix from the unviewable office group
- extract the text preview's header path block shared by the unsupported
  and content branches; clsx for static class joins; CSS trailing newline
- sync the preview-operations and polish Agent Notes with shipped facts
2026-09-14 18:06:23 +08:00

17 lines
657 B
TypeScript

// @vitest-environment jsdom
/** The shared loading status: an icon-only spinner named by its label. */
import { afterEach, describe, expect, it } from 'vitest'
import { cleanup, render } from '@testing-library/react'
import { LoadingIndicator } from '../src/client/LoadingIndicator.tsx'
afterEach(cleanup)
describe('LoadingIndicator', () => {
it('renders no visible text and carries the label as the accessible name', () => {
const { getByRole } = render(<LoadingIndicator label="Reading…" />)
const status = getByRole('status')
expect(status.textContent).toBe('')
expect(status.getAttribute('aria-label')).toBe('Reading…')
})
})