fix(chat): animate app logo while thinking
This commit is contained in:
@@ -138,6 +138,25 @@ test('groups assistant output across tool calls until the run ends', async ({ pa
|
||||
await expect(page.locator('.run-end')).toHaveText('Run output ended')
|
||||
})
|
||||
|
||||
test('animates the application logo while thinking and respects reduced motion', async ({ page }) => {
|
||||
await authenticate(page, TEST_ACCESS_KEY, 'research')
|
||||
await mockHermesApi(page)
|
||||
await mockChatSocket(page)
|
||||
await page.goto('/#/hermes/chat')
|
||||
await sendChatMessage(page, 'think')
|
||||
const { sessionId } = await waitForRunSessionId(page)
|
||||
await page.evaluate((sid) => {
|
||||
(window as any).__PW_CHAT_SOCKET__.latest.__trigger('run.started', { event: 'run.started', session_id: sid, run_id: 'thinking-logo' })
|
||||
}, sessionId)
|
||||
const avatar = page.locator('.thinking-avatar')
|
||||
await expect(avatar).toBeVisible()
|
||||
await expect(avatar).toHaveAttribute('src', '/app-logo.png')
|
||||
await expect(avatar).toHaveCSS('animation-name', /^thinking-avatar-breathe/)
|
||||
await page.emulateMedia({ reducedMotion: 'reduce' })
|
||||
await expect(avatar).toHaveCSS('animation-name', 'none')
|
||||
await expect(page.locator('.thinking-status-label')).toHaveCSS('animation-name', 'none')
|
||||
})
|
||||
|
||||
test('opens the session model dialog and the session search from the chat header', async ({ page }) => {
|
||||
await authenticate(page, TEST_ACCESS_KEY, 'research')
|
||||
await mockHermesApi(page, { sessions: [sampleSession] })
|
||||
|
||||
Reference in New Issue
Block a user