mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-21 14:03:35 +08:00
test(desktop): update chatBlocks thinking assertions to the done-state label
Commit 449ff0b0 changed completed thinking blocks to render the
'thinking.labelDone' title ("Thought"/"已思考") instead of the static
"Thinking" label, and updated ThinkingBlock.test.tsx but not
chatBlocks.test.tsx. The three inactive/default-state cases there still
queried the toggle button by /Thinking/ and failed. Match the new
done-state label (/Thought/); the active-state case is unchanged.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4bea9ee687
commit
760295dcd8
@ -25,7 +25,7 @@ describe('chat blocks', () => {
|
|||||||
it('does not animate inactive historical thinking blocks', () => {
|
it('does not animate inactive historical thinking blocks', () => {
|
||||||
const { container } = render(<ThinkingBlock content="old reasoning" isActive={false} />)
|
const { container } = render(<ThinkingBlock content="old reasoning" isActive={false} />)
|
||||||
|
|
||||||
fireEvent.click(screen.getByRole('button', { name: /Thinking/ }))
|
fireEvent.click(screen.getByRole('button', { name: /Thought/ }))
|
||||||
|
|
||||||
expect(container.textContent).toContain('old reasoning')
|
expect(container.textContent).toContain('old reasoning')
|
||||||
expect(container.querySelector('.thinking-cursor')).toBeNull()
|
expect(container.querySelector('.thinking-cursor')).toBeNull()
|
||||||
@ -38,7 +38,7 @@ describe('chat blocks', () => {
|
|||||||
expect(container.querySelector('strong')).toBeNull()
|
expect(container.querySelector('strong')).toBeNull()
|
||||||
expect(container.querySelector('li')).toBeNull()
|
expect(container.querySelector('li')).toBeNull()
|
||||||
|
|
||||||
fireEvent.click(screen.getByRole('button', { name: /Thinking/ }))
|
fireEvent.click(screen.getByRole('button', { name: /Thought/ }))
|
||||||
|
|
||||||
expect(container.querySelector('strong')?.textContent).toBe('important')
|
expect(container.querySelector('strong')?.textContent).toBe('important')
|
||||||
expect(container.querySelector('li')?.textContent).toBe('item one')
|
expect(container.querySelector('li')?.textContent).toBe('item one')
|
||||||
@ -51,7 +51,7 @@ describe('chat blocks', () => {
|
|||||||
expect(container.textContent).not.toContain('line-1')
|
expect(container.textContent).not.toContain('line-1')
|
||||||
expect(container.textContent).not.toContain('line-11')
|
expect(container.textContent).not.toContain('line-11')
|
||||||
|
|
||||||
fireEvent.click(screen.getByRole('button', { name: /Thinking/ }))
|
fireEvent.click(screen.getByRole('button', { name: /Thought/ }))
|
||||||
|
|
||||||
expect(container.textContent).toContain('line-1')
|
expect(container.textContent).toContain('line-1')
|
||||||
expect(container.textContent).toContain('line-11')
|
expect(container.textContent).toContain('line-11')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user