test(agent-office): cover pulse class for AgentCard state dot
Adds two tests verifying that working state adds the pulse class and idle state does not. Pulse animation is part of the design spec §5 but was not covered by the original 8 tests. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -17,6 +17,22 @@ describe('AgentCard', () => {
|
|||||||
expect(dot).toHaveClass('working');
|
expect(dot).toHaveClass('working');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('working 상태에서는 pulse 클래스도 부여', () => {
|
||||||
|
const { container } = render(
|
||||||
|
<AgentCard agentId="stock" agentState={{ state: 'working' }} notificationCount={0} onClick={() => {}} />
|
||||||
|
);
|
||||||
|
const dot = container.querySelector('.ao-card-dot');
|
||||||
|
expect(dot).toHaveClass('pulse');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('idle 상태에는 pulse 클래스 부여하지 않음', () => {
|
||||||
|
const { container } = render(
|
||||||
|
<AgentCard agentId="stock" agentState={{ state: 'idle' }} notificationCount={0} onClick={() => {}} />
|
||||||
|
);
|
||||||
|
const dot = container.querySelector('.ao-card-dot');
|
||||||
|
expect(dot).not.toHaveClass('pulse');
|
||||||
|
});
|
||||||
|
|
||||||
it('agentState 없으면 idle로 fallback', () => {
|
it('agentState 없으면 idle로 fallback', () => {
|
||||||
const { container } = render(
|
const { container } = render(
|
||||||
<AgentCard agentId="stock" agentState={undefined} notificationCount={0} onClick={() => {}} />
|
<AgentCard agentId="stock" agentState={undefined} notificationCount={0} onClick={() => {}} />
|
||||||
|
|||||||
Reference in New Issue
Block a user