mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
test(web): refresh affected snapshot fixtures
This commit is contained in:
@@ -143,7 +143,7 @@ it('projects titles and routes the next turn through the selected model in the b
|
||||
// allowed for the next turn; stop the fixture's resident run before sending
|
||||
// the route-report prompt.
|
||||
fireEvent.click(screen.getByRole('button', { name: 'Stop generating' }))
|
||||
const composer = await screen.findByPlaceholderText('Message the agent')
|
||||
const composer = await screen.findByPlaceholderText('给智能体发消息')
|
||||
fireEvent.change(composer, { target: { value: 'report model' } })
|
||||
fireEvent.keyDown(composer, { key: 'Enter' })
|
||||
await screen.findByText('当前模型:openai/gpt-5 · 推理等级:max', {}, { timeout: 10_000 })
|
||||
|
||||
@@ -57,12 +57,16 @@ class ResizeObserverStub {
|
||||
unobserve(): void {}
|
||||
}
|
||||
|
||||
// jsdom has no scrollIntoView; the slash menu follows its highlighted option.
|
||||
const scrollIntoView = vi.fn()
|
||||
const win = window as FixtureWindow
|
||||
let unmount: (() => void) | undefined
|
||||
|
||||
beforeEach(() => {
|
||||
localStorage.clear()
|
||||
document.title = 'DeepSeek Harness'
|
||||
Element.prototype.scrollIntoView = scrollIntoView
|
||||
scrollIntoView.mockClear()
|
||||
vi.stubGlobal('ResizeObserver', ResizeObserverStub)
|
||||
vi.stubGlobal('requestAnimationFrame', (callback: FrameRequestCallback) =>
|
||||
setTimeout(() => { callback(0) }, 0) as unknown as number)
|
||||
@@ -80,6 +84,7 @@ afterEach(() => {
|
||||
document.head.querySelectorAll('style[data-plugin]').forEach((style) => { style.remove() })
|
||||
document.title = ''
|
||||
history.replaceState(null, '', '/')
|
||||
Reflect.deleteProperty(Element.prototype, 'scrollIntoView')
|
||||
vi.unstubAllGlobals()
|
||||
})
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@ it('hides the plan strip when the next turn starts', async () => {
|
||||
await openFixtureSession()
|
||||
expect(document.querySelector('[data-testid="todo-panel"]')).not.toBeNull()
|
||||
|
||||
const composer = await screen.findByPlaceholderText('Message the agent', {}, { timeout: 10_000 })
|
||||
const composer = await screen.findByPlaceholderText('给智能体发消息', {}, { timeout: 10_000 })
|
||||
fireEvent.change(composer, { target: { value: '下一轮清空计划' } })
|
||||
fireEvent.keyDown(composer, { key: 'Enter' })
|
||||
|
||||
|
||||
Reference in New Issue
Block a user