- 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
17 lines
657 B
TypeScript
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…')
|
|
})
|
|
})
|